func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
rdp_out_ts_bitmap_capabilityset(STREAM s)
{
logger(Protocol, Debug, "rdp_out_ts_bitmap_capabilityset(), %dx%d",
g_session_width, g_session_height);
out_uint16_le(s, RDP_CAPSET_BITMAP);
out_uint16_le(s, RDP_CAPLEN_BITMAP);
out_uint16_le(s, g_server_depth); /* preferredBitsPerPixel */
out_uint16_le(s, 1); /*... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 164,255,160,573,702,330,000,000,000,000,000,000,000 | 20 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
zfs_ace_fuid_mask_off(void)
{
return (offsetof(zfs_ace_hdr_t, z_access_mask));
} | 0 | [
"CWE-200",
"CWE-732"
] | zfs | 716b53d0a14c72bda16c0872565dd1909757e73f | 68,076,716,826,121,270,000,000,000,000,000,000,000 | 4 | FreeBSD: Fix UNIX permissions checking
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #10727 |
static void msf2_emac_register_types(void)
{
type_register_static(&msf2_emac_info);
} | 0 | [
"CWE-835"
] | qemu | 26194a58f4eb83c5bdf4061a1628508084450ba1 | 24,558,629,014,762,110,000,000,000,000,000,000,000 | 4 | msf2-mac: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.c... |
static long __get_user_pages_remote(struct task_struct *tsk,
struct mm_struct *mm,
unsigned long start, unsigned long nr_pages,
unsigned int gup_flags, struct page **pages,
struct vm_area_struct **vmas, int *locked)
{
return 0;
} | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 321,857,919,976,296,930,000,000,000,000,000,000,000 | 8 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
int load_uimage_as(const char *filename, hwaddr *ep, hwaddr *loadaddr,
int *is_linux,
uint64_t (*translate_fn)(void *, uint64_t),
void *translate_opaque, AddressSpace *as)
{
return load_uboot_image(filename, ep, loadaddr, is_linux, IH_TYPE_KERNEL,
... | 0 | [
"CWE-787"
] | qemu | e423455c4f23a1a828901c78fe6d03b7dde79319 | 174,267,009,847,209,400,000,000,000,000,000,000,000 | 8 | hw/core/loader: Fix possible crash in rom_copy()
Both, "rom->addr" and "addr" are derived from the binary image
that can be loaded with the "-kernel" paramer. The code in
rom_copy() then calculates:
d = dest + (rom->addr - addr);
and uses "d" as destination in a memcpy() some lines later. Now with
bad kernel ima... |
update_fb_drifts(double freq_ppm, double update_interval)
{
int i, secs;
assert(are_we_synchronised);
if (next_fb_drift > 0) {
#if 0
/* Reset drifts that were used when we were unsynchronised */
for (i = 0; i < next_fb_drift - fb_drift_min; i++)
fb_drifts[i].secs = 0.0;
#endif
next_fb_drift = ... | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 329,519,593,956,586,970,000,000,000,000,000,000,000 | 41 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
print_elist(const char *elp _U_, u_int len _U_)
{
/* Not enough examples available for me to debug this */
return (1);
} | 0 | [
"CWE-125"
] | tcpdump | c6e0531b5def26ecf912e8de6ade86cbdaed3751 | 153,157,572,011,903,290,000,000,000,000,000,000,000 | 5 | CVE-2017-12899/DECnet: Fix bounds checking.
If we're skipping over padding before the *real* flags, check whether
the real flags are in the captured data before fetching it. This fixes
a buffer over-read discovered by Kamil Frankowicz.
Note one place where we don't need to do bounds checking as it's already
been don... |
optimize_nodes(Node* node, OptNode* opt, OptEnv* env)
{
int i;
int r;
OptNode xo;
OnigEncoding enc;
r = 0;
enc = env->enc;
clear_node_opt_info(opt);
set_bound_node_opt_info(opt, &env->mm);
switch (NODE_TYPE(node)) {
case NODE_LIST:
{
OptEnv nenv;
Node* nd = node;
copy_opt_en... | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 136,219,248,538,121,530,000,000,000,000,000,000,000 | 315 | #207: Out-of-bounds write |
void t_cpp_generator::generate_service_null(t_service* tservice, string style) {
string extends = "";
if (tservice->get_extends() != NULL) {
extends = " , virtual public " + type_name(tservice->get_extends()) + style + "Null";
}
f_header_ << "class " << service_name_ << style << "Null : virtual public " << ... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 68,315,378,678,549,030,000,000,000,000,000,000,000 | 44 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
GF_Err gf_isom_audio_sample_entry_read(GF_AudioSampleEntryBox *ptr, GF_BitStream *bs)
{
GF_Err e;
ISOM_DECREASE_SIZE(ptr, 28)
e = gf_isom_base_sample_entry_read((GF_SampleEntryBox *)ptr, bs);
if (e) return e;
ptr->version = gf_bs_read_u16(bs);
ptr->revision = gf_bs_read_u16(bs);
ptr->vendor = gf_bs_read_u32(bs... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 328c6d682698fdb9878dbb4f282963d42c538c01 | 30,734,490,735,289,545,000,000,000,000,000,000,000 | 29 | fixed #1756 |
int SaveThumbnail(char * ThumbFileName)
{
FILE * ThumbnailFile;
if (ImageInfo.ThumbnailOffset == 0 || ImageInfo.ThumbnailSize == 0){
fprintf(stderr,"Image contains no thumbnail\n");
return FALSE;
}
if (strcmp(ThumbFileName, "-") == 0){
// A filename of '-' indicates t... | 0 | [
"CWE-787"
] | jhead | 5186ddcf9e35a7aa0ff0539489a930434a1325f4 | 215,335,735,612,559,300,000,000,000,000,000,000,000 | 31 | Just allocate 20 bytes extra at the end of a section. Otherwise, we end
up with a whole lot of little checks for structures that the file says
are there but are unexpectedly cut off in fuzz tests |
textpos2screenpos(
win_T *wp,
pos_T *pos,
int *rowp, // screen row
int *scolp, // start screen column
int *ccolp, // cursor screen column
int *ecolp) // end screen column
{
colnr_T scol = 0, ccol = 0, ecol = 0;
int row = 0;
int rowoff = 0;
colnr_T coloff = 0;
if (pos->lnum >= wp->w_topline ... | 0 | [
"CWE-122"
] | vim | 777e7c21b7627be80961848ac560cb0a9978ff43 | 229,215,556,094,182,150,000,000,000,000,000,000,000 | 51 | patch 8.2.3564: invalid memory access when scrolling without valid screen
Problem: Invalid memory access when scrolling without a valid screen.
Solution: Do not set VALID_BOTLINE in w_valid. |
gboolean
mono_verifier_verify_class (MonoClass *class)
{
/*Neither <Module>, object or ifaces have parent.*/
if (!class->parent &&
class != mono_defaults.object_class &&
!MONO_CLASS_IS_INTERFACE (class) &&
(!class->image->dynamic && class->type_token != 0x2000001)) /*<Module> is the first type in the assembly*... | 0 | [
"CWE-20"
] | mono | cf1ec146f7c6acdc6697032b3aaafc68ffacdcac | 224,002,430,310,683,750,000,000,000,000,000,000,000 | 30 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
void kind_del(GF_Box *s)
{
GF_KindBox *ptr = (GF_KindBox *) s;
if (ptr == NULL) return;
if (ptr->schemeURI) gf_free(ptr->schemeURI);
if (ptr->value) gf_free(ptr->value);
gf_free(ptr);
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 269,643,675,039,375,380,000,000,000,000,000,000,000 | 8 | prevent dref memleak on invalid input (#1183) |
static long sqlite_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRMLS_DC)
{
pdo_sqlite_db_handle *H = (pdo_sqlite_db_handle *)dbh->driver_data;
char *errmsg = NULL;
if (sqlite3_exec(H->db, sql, NULL, NULL, &errmsg) != SQLITE_OK) {
pdo_sqlite_error(dbh);
if (errmsg)
sqlite3_free(errmsg);
retu... | 0 | [
"CWE-264"
] | php-src | 055ecbc62878e86287d742c7246c21606cee8183 | 301,795,336,471,575,200,000,000,000,000,000,000,000 | 15 | Improve check for :memory: pseudo-filename in SQlite |
static void Free(const FunctionCallbackInfo<Value>& args) {
Parser* parser;
ASSIGN_OR_RETURN_UNWRAP(&parser, args.Holder());
// Since the Parser destructor isn't going to run the destroy() callbacks
// it needs to be triggered manually.
parser->EmitTraceEventDestroy();
parser->EmitDestroy();
... | 0 | [
"CWE-400"
] | node | 753f3b247ae2d24fee0b3f48b9ec3a5c308f0650 | 84,017,175,075,128,310,000,000,000,000,000,000,000 | 9 | http: add requestTimeout
This commits introduces a new http.Server option called requestTimeout
with a default value in milliseconds of 0.
If requestTimeout is set to a positive value, the server will start a new
timer set to expire in requestTimeout milliseconds when a new connection
is established. The timer is als... |
static void ql_hw_csum_setup(const struct sk_buff *skb,
struct ob_mac_iocb_req *mac_iocb_ptr)
{
const struct iphdr *ip = ip_hdr(skb);
mac_iocb_ptr->ip_hdr_off = skb_network_offset(skb);
mac_iocb_ptr->ip_hdr_len = ip->ihl;
if (ip->protocol == IPPROTO_TCP) {
mac_iocb_ptr->flags1 |= OB_3032MAC_IOCB_REQ_TC... | 0 | [
"CWE-401"
] | linux | 1acb8f2a7a9f10543868ddd737e37424d5c36cf4 | 72,675,335,094,784,100,000,000,000,000,000,000,000 | 17 | net: qlogic: Fix memory leak in ql_alloc_large_buffers
In ql_alloc_large_buffers, a new skb is allocated via netdev_alloc_skb.
This skb should be released if pci_dma_mapping_error fails.
Fixes: 0f8ab89e825f ("qla3xxx: Check return code from pci_map_single() in ql_release_to_lrg_buf_free_list(), ql_populate_free_queue... |
int Field_time::store_time_dec(MYSQL_TIME *ltime, uint dec)
{
MYSQL_TIME l_time= *ltime;
ErrConvTime str(ltime);
int was_cut= 0;
if (curdays && l_time.time_type != MYSQL_TIMESTAMP_TIME)
calc_datetime_days_diff(&l_time, curdays);
int have_smth_to_conv= !check_time_range(&l_time, decimals(), &was_cut);
... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 197,056,463,194,546,570,000,000,000,000,000,000,000 | 12 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
void freeStream(stream *s) {
raxFreeWithCallback(s->rax,(void(*)(void*))lpFree);
if (s->cgroups)
raxFreeWithCallback(s->cgroups,(void(*)(void*))streamFreeCG);
zfree(s);
} | 0 | [
"CWE-125",
"CWE-704"
] | redis | c04082cf138f1f51cedf05ee9ad36fb6763cafc6 | 54,475,755,930,290,360,000,000,000,000,000,000,000 | 6 | Abort in XGROUP if the key is not a stream |
agoo_ws_req_close(agooCon c) {
if (NULL != c->up && agoo_server.ctx_nil_value != c->up->ctx && c->up->on_close) {
agooReq req = agoo_req_create(0);
req->up = c->up;
req->method = AGOO_ON_CLOSE;
req->hook = agoo_hook_create(AGOO_NONE, NULL, c->up->ctx, PUSH_HOOK, &agoo_server.eval_queue);
atomic_fetch_add(&c->... | 0 | [
"CWE-444",
"CWE-61"
] | agoo | 23d03535cf7b50d679a60a953a0cae9519a4a130 | 189,481,016,603,773,600,000,000,000,000,000,000,000 | 11 | Remote addr (#99)
* REMOTE_ADDR added
* Ready for merge |
static void
e1000e_set_rxcsum(E1000ECore *core, int index, uint32_t val)
{
core->mac[RXCSUM] = val;
e1000e_update_rx_offloads(core); | 0 | [
"CWE-835"
] | qemu | 4154c7e03fa55b4cf52509a83d50d6c09d743b77 | 76,683,514,156,096,760,000,000,000,000,000,000,000 | 5 | net: e1000e: fix an infinite loop issue
This issue is like the issue in e1000 network card addressed in
this commit:
e1000: eliminate infinite loops on out-of-bounds transfer start.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Reviewed-by: Dmitry Fleytman <dmitry@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.... |
const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group)
{
return group->meth;
} | 0 | [] | openssl | 21c856b75d81eff61aa63b4f036bb64a85bf6d46 | 77,194,406,407,479,860,000,000,000,000,000,000,000 | 4 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
void zrankCommand(client *c) {
zrankGenericCommand(c, 0);
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 193,833,652,268,548,070,000,000,000,000,000,000,000 | 3 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
int hashTypeSet(robj *o, sds field, sds value, int flags) {
int update = 0;
if (o->encoding == OBJ_ENCODING_ZIPLIST) {
unsigned char *zl, *fptr, *vptr;
zl = o->ptr;
fptr = ziplistIndex(zl, ZIPLIST_HEAD);
if (fptr != NULL) {
fptr = ziplistFind(fptr, (unsigned char*)f... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 98,058,174,108,096,940,000,000,000,000,000,000,000 | 74 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
static inline ut64 dwarf_read_address(size_t size, bool big_endian, const ut8 **buf, const ut8 *buf_end) {
ut64 result;
switch (size) {
case 2:
result = READ16(*buf);
break;
case 4:
result = READ32(*buf);
break;
case 8:
result = READ64(*buf);
break;
default:
result = 0;
*buf += size;
eprintf("We... | 0 | [
"CWE-787"
] | rizin | aa6917772d2f32e5a7daab25a46c72df0b5ea406 | 40,619,282,753,997,570,000,000,000,000,000,000,000 | 19 | Fix oob write for dwarf with abbrev with count 0 (Fix #2083) (#2086) |
void Magick::Image::label(const std::string &label_)
{
modifyImage();
GetPPException;
(void) SetImageProperty(image(),"Label",NULL,exceptionInfo);
if (label_.length() > 0)
(void) SetImageProperty(image(),"Label",label_.c_str(),exceptionInfo);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 40,113,256,693,656,793,000,000,000,000,000,000,000 | 9 | Added missing return to avoid use after free. |
static int cbs_jpeg_split_fragment(CodedBitstreamContext *ctx,
CodedBitstreamFragment *frag,
int header)
{
AVBufferRef *data_ref;
uint8_t *data;
size_t data_size;
int unit, start, end, marker, next_start, next_marker;
int err, i, ... | 1 | [
"CWE-787"
] | FFmpeg | 1812352d767ccf5431aa440123e2e260a4db2726 | 181,781,226,366,346,300,000,000,000,000,000,000,000 | 133 | avcodec/cbs_jpeg: Check length for SOS
Fixes: out of array access
Fixes: 19734/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5673507031875584
Fixes: 19353/clusterfuzz-testcase-minimized-ffmpeg_BSF_TRACE_HEADERS_fuzzer-5703944462663680
Found-by: continuous fuzzing process https://github.com/google/oss... |
static void wolfssl_cleanup(void)
{
wolfSSL_Cleanup();
#ifdef OPENSSL_EXTRA
Curl_tls_keylog_close();
#endif
} | 0 | [
"CWE-290"
] | curl | b09c8ee15771c614c4bf3ddac893cdb12187c844 | 44,135,656,413,934,950,000,000,000,000,000,000,000 | 7 | vtls: add 'isproxy' argument to Curl_ssl_get/addsessionid()
To make sure we set and extract the correct session.
Reported-by: Mingtao Yang
Bug: https://curl.se/docs/CVE-2021-22890.html
CVE-2021-22890 |
static bool r_bin_mdmp_init_hdr(struct r_bin_mdmp_obj *obj) {
obj->hdr = (struct minidump_header *)obj->b->buf;
if (obj->hdr->number_of_streams == 0) {
eprintf ("[WARN] No streams present!\n");
return false;
}
if (obj->hdr->stream_directory_rva < sizeof (struct minidump_header))
{
eprintf ("[ERROR] RVA for... | 0 | [
"CWE-125"
] | radare2 | eb7deb281df54771fb8ecf5890dc325a7d22d3e2 | 227,382,422,480,537,600,000,000,000,000,000,000,000 | 28 | Fix #10464 - oobread crash in mdmp (#10683) |
static void virtual_context_exit(struct intel_context *ce)
{
struct virtual_engine *ve = container_of(ce, typeof(*ve), context);
unsigned int n;
intel_timeline_exit(ce->timeline);
for (n = 0; n < ve->num_siblings; n++)
intel_engine_pm_put(ve->siblings[n]);
} | 0 | [] | linux | bc8a76a152c5f9ef3b48104154a65a68a8b76946 | 101,110,841,259,896,700,000,000,000,000,000,000,000 | 10 | drm/i915/gen9: Clear residual context state on context switch
Intel ID: PSIRT-TA-201910-001
CVEID: CVE-2019-14615
Intel GPU Hardware prior to Gen11 does not clear EU state
during a context switch. This can result in information
leakage between contexts.
For Gen8 and Gen9, hardware provides a mechanism for
fast clear... |
static char *dex_method_signature(RBinDexObj *bin, int method_idx) {
ut32 proto_id, params_off, type_id, list_size;
char *r, *return_type = NULL, *signature = NULL, *buff = NULL;
ut8 *bufptr;
ut16 type_idx;
int pos = 0, i, size = 1;
if (method_idx < 0 || method_idx >= bin->header.method_size) {
return NULL;
... | 0 | [
"CWE-125"
] | radare2 | ead645853a63bf83d8386702cad0cf23b31d7eeb | 35,815,464,249,932,800,000,000,000,000,000,000,000 | 60 | fix #6857 |
nv_gi_cmd(cmdarg_T *cap)
{
int i;
if (curbuf->b_last_insert.lnum != 0)
{
curwin->w_cursor = curbuf->b_last_insert;
check_cursor_lnum();
i = (int)STRLEN(ml_get_curline());
if (curwin->w_cursor.col > (colnr_T)i)
{
if (virtual_active())
curwin->w_cursor.coladd += curwin->w_cursor.col - i;
cu... | 0 | [
"CWE-416"
] | vim | e2fa213cf571041dbd04ab0329303ffdc980678a | 262,943,340,325,001,280,000,000,000,000,000,000,000 | 19 | patch 8.2.5024: using freed memory with "]d"
Problem: Using freed memory with "]d".
Solution: Copy the pattern before searching. |
my_decimal *val_decimal(my_decimal *to)
{
return to_datetime(current_thd).to_decimal(to);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 302,351,193,512,858,740,000,000,000,000,000,000,000 | 4 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
ClearKeyNamesInfo(KeyNamesInfo *info)
{
free(info->name);
darray_free(info->key_names);
darray_free(info->aliases);
} | 0 | [
"CWE-476"
] | libxkbcommon | badb428e63387140720f22486b3acbd3d738859f | 60,328,221,565,146,460,000,000,000,000,000,000,000 | 6 | keycodes: don't try to copy zero key aliases
Move the aliases copy to within the (num_key_aliases > 0) block.
Passing info->aliases into this fuction with invalid aliases will
cause log messages but num_key_aliases stays on 0. The key_aliases array
is never allocated and remains NULL. We then loop through the aliases... |
SYSCALL_DEFINE6(io_uring_enter, unsigned int, fd, u32, to_submit,
u32, min_complete, u32, flags, const sigset_t __user *, sig,
size_t, sigsz)
{
struct io_ring_ctx *ctx;
long ret = -EBADF;
int submitted = 0;
struct fd f;
if (flags & ~(IORING_ENTER_GETEVENTS | IORING_ENTER_SQ_WAKEUP))
return -EINVAL;
f = fd... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 65,970,625,023,051,260,000,000,000,000,000,000,000 | 65 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
TEST_F(QueryPlannerTest, ElemMatchEmbeddedAnd) {
// true means multikey
addIndex(BSON("a.b" << 1 << "a.c" << 1), true);
runQuery(fromjson("{a: {$elemMatch: {b: {$gte: 2, $lt: 4}, c: 25}}}"));
assertNumSolutions(3U);
assertSolutionExists("{cscan: {dir: 1}}");
assertSolutionExists(
"{fetc... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 276,193,386,537,269,800,000,000,000,000,000,000,000 | 18 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
clutter_device_manager_xi2_set_property (GObject *gobject,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
ClutterDeviceManagerXI2 *manager_xi2 = CLUTTER_DEVICE_MANAGER_XI... | 0 | [
"CWE-264"
] | clutter | e310c68d7b38d521e341f4e8a36f54303079d74e | 60,345,327,082,249,090,000,000,000,000,000,000,000 | 18 | x11: trap errors when calling XIQueryDevice
Devices can disappear at any time, causing XIQueryDevice
to throw an error. At the same time, plug a memory leak.
https://bugzilla.gnome.org/show_bug.cgi?id=701974 |
static int local_opendir(FsContext *ctx,
V9fsPath *fs_path, V9fsFidOpenState *fs)
{
int dirfd;
DIR *stream;
dirfd = local_opendir_nofollow(ctx, fs_path->data);
if (dirfd == -1) {
return -1;
}
stream = fdopendir(dirfd);
if (!stream) {
close(dirfd);
... | 0 | [
"CWE-732"
] | qemu | 9c6b899f7a46893ab3b671e341a2234e9c0c060e | 148,325,341,373,559,620,000,000,000,000,000,000,000 | 19 | 9pfs: local: set the path of the export root to "."
The local backend was recently converted to using "at*()" syscalls in order
to ensure all accesses happen below the shared directory. This requires that
we only pass relative paths, otherwise the dirfd argument to the "at*()"
syscalls is ignored and the path is treat... |
reverseSamples24bits (uint16 spp, uint16 bps, uint32 width,
uint8 *ibuff, uint8 *obuff)
{
int ready_bits = 0;
uint32 col;
uint32 src_byte = 0, high_bit = 0;
uint32 bit_offset = 0;
uint32 match_bits = 0, mask_bits = 0;
uint32 buff1 = 0, buff2 = 0;
uint8 bytebuff1 ... | 0 | [
"CWE-125"
] | libtiff | 21d39de1002a5e69caa0574b2cc05d795d6fbfad | 308,649,512,104,816,470,000,000,000,000,000,000,000 | 81 | * tools/tiffcrop.c: fix multiple uint32 overflows in
writeBufferToSeparateStrips(), writeBufferToContigTiles() and
writeBufferToSeparateTiles() that could cause heap buffer overflows.
Reported by Henri Salo from Nixu Corporation.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2592 |
static enum hrtimer_restart io_timeout_fn(struct hrtimer *timer)
{
struct io_timeout_data *data = container_of(timer,
struct io_timeout_data, timer);
struct io_kiocb *req = data->req;
struct io_ring_ctx *ctx = req->ctx;
unsigned long flags;
spin_lock_irqsave(&ctx->timeout_lock, flags);
list_del_init(&req-... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 328,033,831,258,440,700,000,000,000,000,000,000,000 | 22 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
invalid_command()
{
int save_token = c_token;
#ifdef OS2
if (token[c_token].is_token) {
int rc;
rc = ExecuteMacro(gp_input_line + token[c_token].start_index,
token[c_token].length);
if (rc == 0) {
c_token = num_tokens = 0;
return;
}
}
#endif
/* Skip the rest of the co... | 0 | [
"CWE-415"
] | gnuplot | 052cbd17c3cbbc602ee080b2617d32a8417d7563 | 238,977,106,430,059,970,000,000,000,000,000,000,000 | 21 | successive failures of "set print <foo>" could cause double-free
Bug #2312 |
static void put_crypt_info(struct fscrypt_info *ci)
{
if (!ci)
return;
crypto_free_skcipher(ci->ci_ctfm);
kmem_cache_free(fscrypt_info_cachep, ci);
} | 0 | [
"CWE-416",
"CWE-476"
] | linux | 1b53cf9815bb4744958d41f3795d5d5a1d365e2d | 15,761,053,902,372,422,000,000,000,000,000,000,000 | 8 | fscrypt: remove broken support for detecting keyring key revocation
Filesystem encryption ostensibly supported revoking a keyring key that
had been used to "unlock" encrypted files, causing those files to become
"locked" again. This was, however, buggy for several reasons, the most
severe of which was that when key r... |
int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
EC_POINT *point, const BIGNUM *x,
const BIGNUM *y, const BIGNUM *z,
BN_CTX *ctx)
{
if (group->meth->point_set_Jpr... | 0 | [] | openssl | 30c22fa8b1d840036b8e203585738df62a03cec8 | 117,902,564,331,219,720,000,000,000,000,000,000,000 | 18 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
GF_Err ainf_Read(GF_Box *s,GF_BitStream *bs)
{
GF_AssetInformationBox *ptr = (GF_AssetInformationBox *) s;
ISOM_DECREASE_SIZE(s, 4)
ptr->profile_version = gf_bs_read_u32(bs);
return gf_isom_read_null_terminated_string(s, bs, s->size, &ptr->APID);
} | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 110,896,693,687,934,220,000,000,000,000,000,000,000 | 8 | fixed 2 possible heap overflows (inc. #1088) |
static inline int unserialize_allowed_class(zend_string *class_name, HashTable *classes)
{
zend_string *lcname;
int res;
ALLOCA_FLAG(use_heap)
if(classes == NULL) {
return 1;
}
if(!zend_hash_num_elements(classes)) {
return 0;
}
ZSTR_ALLOCA_ALLOC(lcname, ZSTR_LEN(class_name), use_heap);
zend_str_tolower_c... | 0 | [
"CWE-416"
] | php-src | 1a23ebc1fff59bf480ca92963b36eba5c1b904c4 | 126,705,387,461,495,860,000,000,000,000,000,000,000 | 19 | Fixed bug #74103 and bug #75054
Directly fail unserialization when trying to acquire an r/R
reference to an UNDEF HT slot. Previously this left an UNDEF and
later deleted the index/key from the HT.
What actually caused the issue here is a combination of two
factors: First, the key deletion was performed using the has... |
sf_flac_meta_callback (const FLAC__StreamDecoder * UNUSED (decoder), const FLAC__StreamMetadata *metadata, void *client_data)
{ SF_PRIVATE *psf = (SF_PRIVATE*) client_data ;
FLAC_PRIVATE* pflac = (FLAC_PRIVATE*) psf->codec_data ;
int bitwidth = 0, i ;
switch (metadata->type)
{ case FLAC__METADATA_TYPE_STREAMINFO :... | 0 | [
"CWE-119",
"CWE-369"
] | libsndfile | 60b234301adf258786d8b90be5c1d437fc8799e0 | 125,673,907,583,652,950,000,000,000,000,000,000,000 | 84 | src/flac.c: Improve error handling
Especially when dealing with corrupt or malicious files. |
varfmt(const char * varname)
{
u_int n;
for (n = 0; n < COUNTOF(cookedvars); n++)
if (!strcmp(varname, cookedvars[n].varname))
return cookedvars[n].fmt;
return PADDING;
} | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 16,256,725,225,310,266,000,000,000,000,000,000,000 | 10 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
php_apache_sapi_getenv(char *name, size_t name_len TSRMLS_DC)
{
php_struct *ctx = SG(server_context);
const char *env_var;
if (ctx == NULL) {
return NULL;
}
env_var = apr_table_get(ctx->r->subprocess_env, name);
return (char *) env_var;
} | 0 | [
"CWE-20"
] | php-src | 809610f5ea38a83b284e1125d1fff129bdd615e7 | 39,109,986,884,820,107,000,000,000,000,000,000,000 | 13 | Fix bug #68486 and bug #69218 (segfault in apache2handler with apache 2.4) |
static bool database_add_cep(struct external_service *service,
struct external_chrc *chrc)
{
struct gatt_db_attribute *cep;
bt_uuid_t uuid;
uint8_t value[2];
if (!chrc->ext_props)
return true;
bt_uuid16_create(&uuid, GATT_CHARAC_EXT_PROPER_UUID);
cep = gatt_db_service_add_descriptor(service->attrib, &uu... | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 141,780,614,697,828,610,000,000,000,000,000,000,000 | 32 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
static void dothecall (lua_State *L, void *ud) {
UNUSED(ud);
luaD_callnoyield(L, L->top - 2, 0);
} | 0 | [
"CWE-125"
] | lua | 127e7a6c8942b362aa3c6627f44d660a4fb75312 | 165,650,953,514,546,840,000,000,000,000,000,000,000 | 4 | Fixed bug of old finalized objects in the GC
When an object aged OLD1 is finalized, it is moved from the list
'finobj' to the *beginning* of the list 'allgc'. So, this part of the
list (and not only the survival list) must be visited by 'markold'. |
void ipt_unregister_table(struct ipt_table *table)
{
struct xt_table_info *private;
void *loc_cpu_entry;
private = xt_unregister_table(table);
/* Decrease module usage counts and free resources */
loc_cpu_entry = private->entries[raw_smp_processor_id()];
IPT_ENTRY_ITERATE(loc_cpu_entry, private->size, cleanup_... | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 28,499,448,744,526,720,000,000,000,000,000,000,000 | 12 | [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... |
static inline void sk_eat_skb(struct sock *sk, struct sk_buff *skb, bool copied_early)
{
__skb_unlink(skb, &sk->sk_receive_queue);
if (!copied_early)
__kfree_skb(skb);
else
__skb_queue_tail(&sk->sk_async_wait_queue, skb);
} | 1 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 105,526,454,088,292,930,000,000,000,000,000,000,000 | 8 | 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... |
imapx_server_reset_inactivity_timer (CamelIMAPXServer *is)
{
g_mutex_lock (&is->priv->inactivity_timeout_lock);
if (is->priv->inactivity_timeout != NULL) {
g_source_destroy (is->priv->inactivity_timeout);
g_source_unref (is->priv->inactivity_timeout);
}
is->priv->inactivity_timeout =
g_timeout_source_new_se... | 0 | [] | evolution-data-server | f26a6f672096790d0bbd76903db4c9a2e44f116b | 268,242,898,971,293,800,000,000,000,000,000,000,000 | 20 | [IMAPx] 'STARTTLS not supported' error ignored
When a user has setup the STARTTLS encryption method, but the server doesn't
support it, then an error should be shown to the user, instead of using
unsecure connection. There had been two bugs in the existing code which
prevented this error from being used and the failur... |
void sta_info_stop(struct ieee80211_local *local)
{
del_timer_sync(&local->sta_cleanup);
rhltable_destroy(&local->sta_hash);
} | 0 | [
"CWE-287"
] | linux | 3e493173b7841259a08c5c8e5cbe90adb349da7e | 5,461,212,408,937,878,000,000,000,000,000,000,000 | 5 | mac80211: Do not send Layer 2 Update frame before authorization
The Layer 2 Update frame is used to update bridges when a station roams
to another AP even if that STA does not transmit any frames after the
reassociation. This behavior was described in IEEE Std 802.11F-2003 as
something that would happen based on MLME-... |
*/
void skb_prepare_seq_read(struct sk_buff *skb, unsigned int from,
unsigned int to, struct skb_seq_state *st)
{
st->lower_offset = from;
st->upper_offset = to;
st->root_skb = st->cur_skb = skb;
st->frag_idx = st->stepped_offset = 0;
st->frag_data = NULL; | 0 | [
"CWE-703",
"CWE-125"
] | linux | 8605330aac5a5785630aec8f64378a54891937cc | 249,806,799,413,881,950,000,000,000,000,000,000,000 | 9 | tcp: fix SCM_TIMESTAMPING_OPT_STATS for normal skbs
__sock_recv_timestamp can be called for both normal skbs (for
receive timestamps) and for skbs on the error queue (for transmit
timestamps).
Commit 1c885808e456
(tcp: SOF_TIMESTAMPING_OPT_STATS option for SO_TIMESTAMPING)
assumes any skb passed to __sock_recv_timest... |
IPV6DefragReverseSimpleTest(void)
{
DefragContext *dc = NULL;
Packet *p1 = NULL, *p2 = NULL, *p3 = NULL;
Packet *reassembled = NULL;
int id = 12;
int i;
int ret = 0;
DefragInit();
dc = DefragContextNew();
if (dc == NULL)
goto end;
p1 = IPV6BuildTestPacket(IPPROTO_ICMPV... | 0 | [
"CWE-358"
] | suricata | 4a04f814b15762eb446a5ead4d69d021512df6f8 | 174,338,689,155,437,480,000,000,000,000,000,000,000 | 67 | defrag - take protocol into account during re-assembly
The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host. |
FindBestSolidArea(rfbClientPtr cl,
int x,
int y,
int w,
int h,
uint32_t colorValue,
int *w_ptr,
int *h_ptr)
{
int dx, dy, dw, dh;
int w_prev;
int w_best = 0, h_best = 0;
w_prev ... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 56,310,358,461,837,570,000,000,000,000,000,000,000 | 43 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
void dns_trigger_resolution(struct dns_requester *req)
{
struct dns_resolvers *resolvers;
struct dns_resolution *res;
int exp;
if (!req || !req->resolution)
return;
res = req->resolution;
resolvers = res->resolvers;
/* The resolution must not be triggered yet. Use the cached response, if
* valid */
... | 0 | [
"CWE-125"
] | haproxy | efbbdf72992cd20458259962346044cafd9331c0 | 202,079,815,160,826,600,000,000,000,000,000,000,000 | 18 | BUG: dns: Prevent out-of-bounds read in dns_validate_dns_response()
We need to make sure that the record length is not making us read
past the end of the data we received.
Before this patch we could for example read the 16 bytes
corresponding to an AAAA record from the non-initialized part of
the buffer, possibly acce... |
vmxnet3_use_msix_vectors(VMXNET3State *s, int num_vectors)
{
PCIDevice *d = PCI_DEVICE(s);
int i;
for (i = 0; i < num_vectors; i++) {
int res = msix_vector_use(d, i);
if (0 > res) {
VMW_WRPRN("Failed to use MSI-X vector %d, error %d", i, res);
vmxnet3_unuse_msix_vecto... | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 209,853,559,889,897,200,000,000,000,000,000,000,000 | 14 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... |
int EntriesByGamma(cmsFloat64Number Gamma)
{
if (fabs(Gamma - 1.0) < 0.001) return 2;
return 4096;
} | 0 | [] | Little-CMS | 9cf2d61867375f867e6e80906a571d222bc2cbf3 | 33,369,993,280,518,642,000,000,000,000,000,000,000 | 5 | Memory squeezing fix: LCMS2: AllocateToneCurveStruct
Simply add an extra check on the last allocation to avoid returning a
partially built struct. |
Representation HInferRepresentation::TryChange(HValue* value) {
// Array of use counts for each representation.
int use_count[Representation::kNumRepresentations] = { 0 };
for (HUseIterator it(value->uses()); !it.Done(); it.Advance()) {
HValue* use = it.value();
Representation rep = use->ObservedInputRep... | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 151,187,160,422,137,280,000,000,000,000,000,000,000 | 41 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
static struct Qdisc *qdisc_match_from_root(struct Qdisc *root, u32 handle)
{
struct Qdisc *q;
if (!(root->flags & TCQ_F_BUILTIN) &&
root->handle == handle)
return root;
list_for_each_entry(q, &root->list, list) {
if (q->handle == handle)
return q;
}
return NULL;
} | 0 | [
"CWE-909"
] | linux-2.6 | 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b | 60,445,706,138,906,610,000,000,000,000,000,000,000 | 14 | tc: Fix unitialized kernel memory leak
Three bytes of uninitialized kernel memory are currently leaked to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
GF_Err tfra_dump(GF_Box *a, FILE * trace)
{
u32 i;
GF_TrackFragmentRandomAccessBox *p = (GF_TrackFragmentRandomAccessBox *)a;
gf_isom_box_dump_start(a, "TrackFragmentRandomAccessBox", trace);
fprintf(trace, "TrackId=\"%u\" number_of_entries=\"%u\">\n", p->track_id, p->nb_entries);
for (i=0; i<p->nb_entries; i++) {... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 203,066,977,955,349,150,000,000,000,000,000,000,000 | 17 | fixed 2 possible heap overflows (inc. #1088) |
static void imx_usdhc_init(Object *obj)
{
SDHCIState *s = SYSBUS_SDHCI(obj);
s->io_ops = &usdhc_mmio_ops;
s->quirks = SDHCI_QUIRK_NO_BUSY_IRQ;
} | 0 | [
"CWE-119"
] | qemu | dfba99f17feb6d4a129da19d38df1bcd8579d1c3 | 63,773,727,422,305,420,000,000,000,000,000,000,000 | 7 | hw/sd/sdhci: Fix DMA Transfer Block Size field
The 'Transfer Block Size' field is 12-bit wide.
See section '2.2.2. Block Size Register (Offset 004h)' in datasheet.
Two different bug reproducer available:
- https://bugs.launchpad.net/qemu/+bug/1892960
- https://ruhr-uni-bochum.sciebo.de/s/NNWP2GfwzYKeKwE?path=%2Fsdhc... |
static void wq_add(struct mqueue_inode_info *info, int sr,
struct ext_wait_queue *ewp)
{
struct ext_wait_queue *walk;
ewp->task = current;
list_for_each_entry(walk, &info->e_wait_q[sr].list, list) {
if (walk->task->static_prio <= current->static_prio) {
list_add_tail(&ewp->list, &walk->list);
return;
... | 0 | [
"CWE-416"
] | linux | f991af3daabaecff34684fd51fac80319d1baad1 | 311,970,722,059,349,760,000,000,000,000,000,000,000 | 15 | mqueue: fix a use-after-free in sys_mq_notify()
The retry logic for netlink_attachskb() inside sys_mq_notify()
is nasty and vulnerable:
1) The sock refcnt is already released when retry is needed
2) The fd is controllable by user-space because we already
release the file refcnt
so we when retry but the fd has bee... |
void blosc_cbuffer_metainfo(const void* cbuffer, size_t* typesize, int* flags) {
uint8_t* _src = (uint8_t*)(cbuffer); /* current pos for source buffer */
uint8_t version = _src[0]; /* blosc format version */
if (version > BLOSC_VERSION_FORMAT) {
/* Version from future */
*flags = 0... | 0 | [
"CWE-787"
] | c-blosc2 | c4c6470e88210afc95262c8b9fcc27e30ca043ee | 259,038,132,406,099,930,000,000,000,000,000,000,000 | 14 | Fixed asan heap buffer overflow when not enough space to write compressed block size. |
static int send_solicitation(GDHCPClient *dhcp_client)
{
return send_dhcpv6_msg(dhcp_client, DHCPV6_SOLICIT, "solicit");
} | 0 | [] | connman | a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 | 76,357,533,918,658,810,000,000,000,000,000,000,000 | 4 | gdhcp: Avoid leaking stack data via unitiialized variable
Fixes: CVE-2021-26676 |
k5_asn1_decode_uint(const uint8_t *asn1, size_t len, uintmax_t *val)
{
uintmax_t n;
size_t i;
if (len == 0)
return ASN1_BAD_LENGTH;
/* Check for negative values and check length. */
if ((asn1[0] & 0x80) || len > sizeof(uintmax_t) + (asn1[0] == 0))
return ASN1_OVERFLOW;
for (i = ... | 0 | [
"CWE-674",
"CWE-787"
] | krb5 | 57415dda6cf04e73ffc3723be518eddfae599bfd | 166,651,573,777,293,250,000,000,000,000,000,000,000 | 15 | Add recursion limit for ASN.1 indefinite lengths
The libkrb5 ASN.1 decoder supports BER indefinite lengths. It
computes the tag length using recursion; the lack of a recursion limit
allows an attacker to overrun the stack and cause the process to
crash. Reported by Demi Obenour.
CVE-2020-28196:
In MIT krb5 release... |
static bool io_assign_file(struct io_kiocb *req, unsigned int issue_flags)
{
if (req->file || !io_op_defs[req->opcode].needs_file)
return true;
if (req->flags & REQ_F_FIXED_FILE)
req->file = io_file_get_fixed(req, req->fd, issue_flags);
else
req->file = io_file_get_normal(req, req->fd);
if (req->file)
ret... | 0 | [
"CWE-909",
"CWE-94"
] | linux | 32452a3eb8b64e01e2be717f518c0be046975b9d | 279,361,477,009,447,840,000,000,000,000,000,000,000 | 16 | io_uring: fix uninitialized field in rw io_kiocb
io_rw_init_file does not initialize kiocb->private, so when iocb_bio_iopoll
reads kiocb->private it can contain uninitialized data.
Fixes: 3e08773c3841 ("block: switch polling to be bio based")
Signed-off-by: Joseph Ravichandran <jravi@mit.edu>
Signed-off-by: Jens Axbo... |
void cil_destroy_boolif(struct cil_booleanif *bif)
{
if (bif == NULL) {
return;
}
cil_list_destroy(&bif->str_expr, CIL_TRUE);
cil_list_destroy(&bif->datum_expr, CIL_FALSE);
free(bif);
} | 0 | [
"CWE-125"
] | selinux | 340f0eb7f3673e8aacaf0a96cbfcd4d12a405521 | 13,849,116,046,779,200,000,000,000,000,000,000,000 | 11 | libsepol/cil: Check for statements not allowed in optional blocks
While there are some checks for invalid statements in an optional
block when resolving the AST, there are no checks when building the
AST.
OSS-Fuzz found the following policy which caused a null dereference
in cil_tree_get_next_path().
(blockinherit ... |
static int tm_cgpr32_set(struct task_struct *target,
const struct user_regset *regset,
unsigned int pos, unsigned int count,
const void *kbuf, const void __user *ubuf)
{
return gpr32_set_common(target, regset, pos, count, kbuf, ubuf,
&target->thread.ckpt_regs.gpr[0]);
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 220,696,795,753,413,900,000,000,000,000,000,000,000 | 8 | powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
th... |
static int nsfs_show_path(struct seq_file *seq, struct dentry *dentry)
{
struct inode *inode = d_inode(dentry);
const struct proc_ns_operations *ns_ops = dentry->d_fsdata;
seq_printf(seq, "%s:[%lu]", ns_ops->name, inode->i_ino);
return 0;
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 073c516ff73557a8f7315066856c04b50383ac34 | 312,649,459,639,693,770,000,000,000,000,000,000,000 | 8 | nsfs: mark dentry with DCACHE_RCUACCESS
Andrey reported a use-after-free in __ns_get_path():
spin_lock include/linux/spinlock.h:299 [inline]
lockref_get_not_dead+0x19/0x80 lib/lockref.c:179
__ns_get_path+0x197/0x860 fs/nsfs.c:66
open_related_ns+0xda/0x200 fs/nsfs.c:143
sock_ioctl+0x39d/0x440 net/socket.c:10... |
static inline void SetPixelMetacontentExtent(Image *image,const size_t extent)
{
image->metacontent_extent=extent;
} | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 450bd716ed3b9186dd10f9e60f630a3d9eeea2a4 | 143,672,591,981,626,760,000,000,000,000,000,000,000 | 4 | |
int manager_reload(Manager *m) {
int r, q;
_cleanup_fclose_ FILE *f = NULL;
_cleanup_fdset_free_ FDSet *fds = NULL;
assert(m);
r = manager_open_serialization(m, &f);
if (r < 0)
return r;
m->n_reloading ++;
bus_manager_send_reloading(m, t... | 0 | [] | systemd | 5ba6985b6c8ef85a8bcfeb1b65239c863436e75b | 256,833,147,386,575,460,000,000,000,000,000,000,000 | 79 | core: allow PIDs to be watched by two units at the same time
In some cases it is interesting to map a PID to two units at the same
time. For example, when a user logs in via a getty, which is reexeced to
/sbin/login that binary will be explicitly referenced as main pid of the
getty service, as well as implicitly refer... |
static int copy_sighand(unsigned long clone_flags, struct task_struct *tsk)
{
struct sighand_struct *sig;
if (clone_flags & CLONE_SIGHAND) {
atomic_inc(¤t->sighand->count);
return 0;
}
sig = kmem_cache_alloc(sighand_cachep, GFP_KERNEL);
rcu_assign_pointer(tsk->sighand, sig);
if (!sig)
return -ENOMEM;... | 0 | [
"CWE-362"
] | linux | 7b55851367136b1efd84d98fea81ba57a98304cf | 38,361,109,667,017,580,000,000,000,000,000,000,000 | 19 | fork: record start_time late
This changes the fork(2) syscall to record the process start_time after
initializing the basic task structure but still before making the new
process visible to user-space.
Technically, we could record the start_time anytime during fork(2). But
this might lead to scenarios where a start_... |
DEFUN(pipeBuf, PIPE_BUF, "Pipe current buffer through a shell command and display output")
{
Buffer *buf;
char *cmd, *tmpf;
FILE *f;
CurrentKeyData = NULL; /* not allowed in w3m-control: */
cmd = searchKeyData();
if (cmd == NULL || *cmd == '\0') {
/* FIXME: gettextize? */
cmd = inputLineHist(... | 0 | [
"CWE-59",
"CWE-241"
] | w3m | 18dcbadf2771cdb0c18509b14e4e73505b242753 | 312,869,586,800,939,600,000,000,000,000,000,000,000 | 44 | Make temporary directory safely when ~/.w3m is unwritable |
static int snd_ctl_subscribe_events(struct snd_ctl_file *file, int __user *ptr)
{
int subscribe;
if (get_user(subscribe, ptr))
return -EFAULT;
if (subscribe < 0) {
subscribe = file->subscribed;
if (put_user(subscribe, ptr))
return -EFAULT;
return 0;
}
if (subscribe) {
file->subscribed = 1;
return 0;... | 0 | [
"CWE-416",
"CWE-125"
] | linux | 6ab55ec0a938c7f943a4edba3d6514f775983887 | 297,531,788,552,862,250,000,000,000,000,000,000,000 | 20 | ALSA: control: Fix an out-of-bounds bug in get_ctl_id_hash()
Since the user can control the arguments provided to the kernel by the
ioctl() system call, an out-of-bounds bug occurs when the 'id->name'
provided by the user does not end with '\0'.
The following log can reveal it:
[ 10.002313] BUG: KASAN: stack-out-... |
std::string proxyToLoon(std::vector<Proxy> &nodes, const std::string &base_conf, std::vector<RulesetContent> &ruleset_content_array, const ProxyGroupConfigs &extra_proxy_group, extra_settings &ext)
{
rapidjson::Document json;
INIReader ini;
std::string proxy;
std::string output_nodelist;
tribool scv... | 0 | [
"CWE-434",
"CWE-94"
] | subconverter | ce8d2bd0f13f05fcbd2ed90755d097f402393dd3 | 60,395,313,952,773,480,000,000,000,000,000,000,000 | 165 | Enhancements
Add authorization check before loading scripts.
Add detailed logs when loading preference settings. |
static void update_cursor(VirtIOGPU *g, struct virtio_gpu_update_cursor *cursor)
{
struct virtio_gpu_scanout *s;
bool move = cursor->hdr.type == VIRTIO_GPU_CMD_MOVE_CURSOR;
if (cursor->pos.scanout_id >= g->conf.max_outputs) {
return;
}
s = &g->scanout[cursor->pos.scanout_id];
trace_vir... | 0 | [
"CWE-772",
"CWE-401"
] | qemu | dd248ed7e204ee8a1873914e02b8b526e8f1b80d | 115,082,392,298,788,840,000,000,000,000,000,000,000 | 38 | virtio-gpu: fix memory leak in set scanout
In virtio_gpu_set_scanout function, when creating the 'rect'
its refcount is set to 2, by pixman_image_create_bits and
qemu_create_displaysurface_pixman function. This can lead
a memory leak issues. This patch avoid this issue.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Rev... |
pg_load_tz(const char *name)
{
static pg_tz tz;
if (strlen(name) > TZ_STRLEN_MAX)
return NULL; /* not going to fit */
/*
* "GMT" is always sent to tzparse(); see comments for pg_tzset().
*/
if (strcmp(name, "GMT") == 0)
{
if (tzparse(name, &tz.state, TRUE) != 0)
{
/* This really, really should not... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 256,704,370,068,996,760,000,000,000,000,000,000,000 | 30 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
static void esp_register_types(void)
{
type_register_static(&sysbus_esp_info);
type_register_static(&esp_info);
} | 0 | [
"CWE-476"
] | qemu | 0db895361b8a82e1114372ff9f4857abea605701 | 202,283,356,297,890,100,000,000,000,000,000,000,000 | 5 | esp: always check current_req is not NULL before use in DMA callbacks
After issuing a SCSI command the SCSI layer can call the SCSIBusInfo .cancel
callback which resets both current_req and current_dev to NULL. If any data
is left in the transfer buffer (async_len != 0) then the next TI (Transfer
Information) command ... |
BlockTransformation* NewDecryption(const byte *keyStr) const
{return new D(keyStr, m_keylen);}
| 0 | [
"CWE-190",
"CWE-125"
] | cryptopp | 07dbcc3d9644b18e05c1776db2a57fe04d780965 | 128,765,456,122,668,330,000,000,000,000,000,000,000 | 2 | Add Inflator::BadDistanceErr exception (Issue 414)
The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings |
deep_free_object_list (gpointer data)
{
g_list_free_full ((GList *)data, g_object_unref);
} | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 131,982,800,335,513,700,000,000,000,000,000,000,000 | 4 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static inline __be32 ip6_make_flowlabel(struct net *net, struct sk_buff *skb,
__be32 flowlabel, bool autolabel,
struct flowi6 *fl6)
{
u32 hash;
if (flowlabel ||
net->ipv6.sysctl.auto_flowlabels == IP6_AUTO_FLOW_LABEL_OFF ||
(!autolabel &&
net->ipv6.sysctl.auto_flowlabels != IP6_AUTO_FLOW_LA... | 0 | [
"CWE-416",
"CWE-284",
"CWE-264"
] | linux | 45f6fad84cc305103b28d73482b344d7f5b76f39 | 317,749,549,810,106,820,000,000,000,000,000,000,000 | 27 | ipv6: add complete rcu protection around np->opt
This patch addresses multiple problems :
UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions
while socket is not locked : Other threads can change np->opt
concurrently. Dmitry posted a syzkaller
(http://github.com/google/syzkaller) program desmonstrating
use-a... |
pcsc_pinpad_modify (int slot, int class, int ins, int p0, int p1,
pininfo_t *pininfo)
{
int sw;
unsigned char *pin_modify;
int len = PIN_MODIFY_STRUCTURE_SIZE + 2 * pininfo->fixedlen;
unsigned char result[2];
pcsc_dword_t resultlen = 2;
int no_lc;
if (!reader_table[slot].atrlen
... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 52,751,823,423,435,150,000,000,000,000,000,000,000 | 82 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
std::vector<std::string> getBinaries(cl_program & clProgram) {
std::vector<std::string> vReturn;
auto vSizes = clGetWrapperVector<size_t>(clGetProgramInfo, clProgram, CL_PROGRAM_BINARY_SIZES);
if (!vSizes.empty()) {
unsigned char * * pBuffers = new unsigned char *[vSizes.size()];
for (size_t i = 0; i < vSizes.si... | 0 | [
"CWE-703"
] | profanity | 69ff010c14ff80ec14246772db6a245aa59e6689 | 254,726,995,508,540,900,000,000,000,000,000,000,000 | 21 | [FIX] pritive key seed . |
ImagingDestroyBlock(Imaging im)
{
if (im->block)
free(im->block);
} | 0 | [
"CWE-284"
] | Pillow | 5d8a0be45aad78c5a22c8d099118ee26ef8144af | 206,770,209,961,505,140,000,000,000,000,000,000,000 | 5 | Memory error in Storage.c when accepting negative image size arguments |
void ConnectionManagerUtility::mutateResponseHeaders(ResponseHeaderMap& response_headers,
const RequestHeaderMap* request_headers,
ConnectionManagerConfig& config,
... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 256,182,662,510,723,340,000,000,000,000,000,000,000 | 38 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void ip_mc_reset(struct in_device *in_dev)
{
} | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 206,295,023,900,264,130,000,000,000,000,000,000,000 | 3 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
inline uint8_t* WireFormatLite::WriteBoolToArray(int field_number, bool value,
uint8_t* target) {
target = WriteTagToArray(field_number, WIRETYPE_VARINT, target);
return WriteBoolNoTagToArray(value, target);
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 222,922,317,296,586,500,000,000,000,000,000,000,000 | 5 | Apply patch |
asmlinkage long compat_sys_keyctl(u32 option,
u32 arg2, u32 arg3, u32 arg4, u32 arg5)
{
switch (option) {
case KEYCTL_GET_KEYRING_ID:
return keyctl_get_keyring_ID(arg2, arg3);
case KEYCTL_JOIN_SESSION_KEYRING:
return keyctl_join_session_keyring(compat_ptr(arg2));
case KEYCTL_UPDATE:
return keyctl_upda... | 1 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 313,399,268,772,875,100,000,000,000,000,000,000,000 | 65 | 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... |
static void screenshot(const int x0, const int y0, const int x1, const int y1, CImg<T>& img) {
cimg::unused(x0,y0,x1,y1,&img);
_no_display_exception();
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 237,730,808,504,745,500,000,000,000,000,000,000,000 | 4 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
win_count(void)
{
win_T *wp;
int count = 0;
FOR_ALL_WINDOWS(wp)
++count;
return count;
} | 0 | [
"CWE-416"
] | vim | ec66c41d84e574baf8009dbc0bd088d2bc5b2421 | 338,831,808,946,087,150,000,000,000,000,000,000,000 | 9 | patch 8.1.2136: using freed memory with autocmd from fuzzer
Problem: using freed memory with autocmd from fuzzer. (Dhiraj Mishra,
Dominique Pelle)
Solution: Avoid using "wp" after autocommands. (closes #5041) |
static int kvm_xen_hypercall_set_result(struct kvm_vcpu *vcpu, u64 result)
{
kvm_rax_write(vcpu, result);
return kvm_skip_emulated_instruction(vcpu);
} | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 35,197,070,586,083,813,000,000,000,000,000,000,000 | 5 | 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... |
static void vpc_close(BlockDriverState *bs)
{
BDRVVPCState *s = bs->opaque;
g_free(s->pagetable);
#ifdef CACHE
g_free(s->pageentry_u8);
#endif
migrate_del_blocker(s->migration_blocker);
error_free(s->migration_blocker);
} | 1 | [
"CWE-20"
] | qemu | 97f1c45c6f456572e5b504b8614e4a69e23b8e3a | 155,101,673,943,592,290,000,000,000,000,000,000,000 | 11 | vpc/vhd: add bounds check for max_table_entries and block_size (CVE-2014-0144)
This adds checks to make sure that max_table_entries and block_size
are in sane ranges. Memory is allocated based on max_table_entries,
and block_size is used to calculate indices into that allocated
memory, so if these values are incorrec... |
onig_node_conv_to_str_node(Node* node, int flag)
{
NODE_SET_TYPE(node, NODE_STRING);
STR_(node)->flag = flag;
STR_(node)->capacity = 0;
STR_(node)->s = STR_(node)->buf;
STR_(node)->end = STR_(node)->buf;
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-674"
] | oniguruma | 4097828d7cc87589864fecf452f2cd46c5f37180 | 199,227,994,308,953,100,000,000,000,000,000,000,000 | 8 | fix #147: Stack Exhaustion Problem caused by some parsing functions in regcomp.c making recursive calls to themselves. |
irc_mode_smart_filtered (struct t_irc_server *server, char mode)
{
const char *ptr_modes;
ptr_modes = weechat_config_string (irc_config_look_smart_filter_mode);
/* if empty value, there's no smart filtering on mode messages */
if (!ptr_modes || !ptr_modes[0])
return 0;
/* if var is "*", A... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 6f4f147d8e86adf9ad34a8ffd7e7f1f23a7e74da | 16,369,142,482,856,469,000,000,000,000,000,000,000 | 31 | irc: fix crash when receiving a malformed message 324 (channel mode)
Thanks to Stuart Nevans Locke for reporting the issue. |
_g_strchrs (const char *str,
const char *chars)
{
const char *c;
for (c = chars; *c != '\0'; c++)
if (strchr (str, *c) != NULL)
return TRUE;
return FALSE;
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 231,193,682,373,208,800,000,000,000,000,000,000,000 | 9 | libarchive: sanitize filenames before extracting |
SPL_METHOD(SplObjectStorage, offsetGet)
{
zval *obj;
spl_SplObjectStorageElement *element;
spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis());
zend_string *hash;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "o", &obj) == FAILURE) {
return;
}
hash = spl_object_storage_get_hash(intern, getThis(), obj);
... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 61cdd1255d5b9c8453be71aacbbf682796ac77d4 | 151,417,776,370,590,300,000,000,000,000,000,000,000 | 28 | Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key |
static struct alloted_s *append_alloted(struct alloted_s **head, char *name,
int n)
{
struct alloted_s *cur, *al;
if (!head || !name) {
/* Sanity check. Parameters should not be null. */
usernic_error("%s\n", "Unexpected NULL argument");
return NULL;
}
al = malloc(sizeof(struct alloted_s));
if (!al) {... | 0 | [
"CWE-417"
] | lxc | 5eb45428b312e978fb9e294dde16efb14dd9fa4d | 17,824,075,076,911,436,000,000,000,000,000,000,000 | 39 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.