func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
zzip_mem_disk_findfile(ZZIP_MEM_DISK* dir,
char* filename, ZZIP_MEM_ENTRY* after,
zzip_strcmp_fn_t compare)
{
ZZIP_MEM_ENTRY* entry = (! after ? dir->list : after->zz_next);
if (! compare) compare = (zzip_strcmp_fn_t) (strcmp);
for (; entry ; entry = entry->zz_next) {
if (... | 0 | [
"CWE-119"
] | zziplib | 596d9dfce2624e849417d4301e8d67935608aa5e | 176,493,367,633,416,980,000,000,000,000,000,000,000 | 13 | memdisk
(.) |
void hns_rcb_update_stats(struct hnae_queue *queue)
{
struct ring_pair_cb *ring =
container_of(queue, struct ring_pair_cb, q);
struct dsaf_device *dsaf_dev = ring->rcb_common->dsaf_dev;
struct ppe_common_cb *ppe_common
= dsaf_dev->ppe_common[ring->rcb_common->comm_index];
struct hns_ring_hw_stats *hw_stats = &r... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 276,422,786,243,507,300,000,000,000,000,000,000,000 | 27 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
account_entity_enqueue(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
update_load_add(&cfs_rq->load, se->load.weight);
cfs_rq->nr_running++;
se->on_rq = 1;
} | 0 | [] | linux-2.6 | 6a6029b8cefe0ca7e82f27f3904dbedba3de4e06 | 188,637,679,406,001,040,000,000,000,000,000,000,000 | 6 | sched: simplify sched_slice()
Use the existing calc_delta_mine() calculation for sched_slice(). This
saves a divide and simplifies the code because we share it with the
other /cfs_rq->load users.
It also improves code size:
text data bss dec hex filename
42659 2740 144 45543 b1e... |
SYSCALL_DEFINE3(fsmount, int, fs_fd, unsigned int, flags,
unsigned int, attr_flags)
{
struct mnt_namespace *ns;
struct fs_context *fc;
struct file *file;
struct path newmount;
struct mount *mnt;
struct fd f;
unsigned int mnt_flags = 0;
long ret;
if (!may_mount())
return -EPERM;
if ((flags & ~(FSMOUNT_CL... | 0 | [
"CWE-200"
] | linux | 427215d85e8d1476da1a86b8d67aceb485eb3631 | 19,428,628,217,114,685,000,000,000,000,000,000,000 | 121 | ovl: prevent private clone if bind mount is not allowed
Add the following checks from __do_loopback() to clone_private_mount() as
well:
- verify that the mount is in the current namespace
- verify that there are no locked children
Reported-by: Alois Wohlschlager <alois1@gmx-topmail.de>
Fixes: c771d683a62e ("vfs: ... |
virtual void print(String *str, enum_query_type query_type)
{ ident->print(str, query_type); } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 89,038,788,561,708,740,000,000,000,000,000,000,000 | 2 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
mark_all(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, pdf_obj *val, int flag, int page)
{
if (pdf_mark_obj(ctx, val))
return;
fz_try(ctx)
{
if (pdf_is_indirect(ctx, val))
{
int num = pdf_to_num(ctx, val);
if (opts->use_list[num] & USE_PAGE_MASK)
/* Already used */
opts->use_list[nu... | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 253,129,517,652,279,000,000,000,000,000,000,000,000 | 47 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
static int io_timeout_remove(struct io_kiocb *req)
{
struct io_ring_ctx *ctx = req->ctx;
int ret;
spin_lock_irq(&ctx->completion_lock);
ret = io_timeout_cancel(ctx, req->timeout.addr);
io_cqring_fill_event(req, ret);
io_commit_cqring(ctx);
spin_unlock_irq(&ctx->completion_lock);
io_cqring_ev_posted(ctx);
if ... | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 308,721,512,013,094,900,000,000,000,000,000,000,000 | 17 | io_uring: grab ->fs as part of async preparation
This passes it in to io-wq, so it assumes the right fs_struct when
executing async work that may need to do lookups.
Cc: stable@vger.kernel.org # 5.3+
Signed-off-by: Jens Axboe <axboe@kernel.dk> |
sys_info(
sockaddr_u *srcadr,
endpt *inter,
struct req_pkt *inpkt
)
{
register struct info_sys *is;
is = (struct info_sys *)prepare_pkt(srcadr, inter, inpkt,
v6sizeof(struct info_sys));
if (sys_peer) {
if (IS_IPV4(&sys_peer->srcadr)) {
is->peer = NSRCADR(&sys_peer->srcadr);
if (client_v6_capable)
... | 0 | [
"CWE-190"
] | ntp | c04c3d3d940dfe1a53132925c4f51aef017d2e0f | 105,841,656,552,590,180,000,000,000,000,000,000,000 | 65 | [TALOS-CAN-0052] crash by loop counter underrun. |
static size_t ZSTD_resetCCtx_usingCDict(ZSTD_CCtx* cctx,
const ZSTD_CDict* cdict,
ZSTD_CCtx_params params,
U64 pledgedSrcSize,
ZSTD_buffered_policy_e zbuff)
{
DEBUGLOG(4, "ZSTD_resetCCtx_usingCDict (pled... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 307,969,385,074,908,640,000,000,000,000,000,000,000 | 17 | fixed T36302429 |
static int nft_delset(const struct nft_ctx *ctx, struct nft_set *set)
{
int err;
err = nft_trans_set_add(ctx, NFT_MSG_DELSET, set);
if (err < 0)
return err;
nft_deactivate_next(ctx->net, set);
ctx->table->use--;
return err;
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 139,560,385,607,342,700,000,000,000,000,000,000,000 | 13 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
nautilus_mime_types_get_number_of_groups (void)
{
return G_N_ELEMENTS (mimetype_groups);
} | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 149,177,568,450,420,180,000,000,000,000,000,000,000 | 4 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
static void EventClassBNvmCtxChanged( void )
{
CallNvmCtxCallback( LORAMAC_NVMCTXMODULE_CLASS_B );
}
| 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 203,460,733,716,483,020,000,000,000,000,000,000,000 | 4 | Added received buffer size checks. |
mbfl_buffer_converter_getbuffer(mbfl_buffer_converter *convd, mbfl_string *result)
{
if (convd != NULL && result != NULL && convd->device.buffer != NULL) {
result->no_encoding = convd->to->no_encoding;
result->val = convd->device.buffer;
result->len = convd->device.pos;
} else {
result = NULL;
}
return res... | 0 | [
"CWE-119"
] | php-src | 64f42c73efc58e88671ad76b6b6bc8e2b62713e1 | 80,878,653,743,106,330,000,000,000,000,000,000,000 | 12 | Fixed bug #71906: AddressSanitizer: negative-size-param (-1) in mbfl_strcut |
static void rdp_capability_set_finish(wStream* s, UINT16 header, UINT16 type)
{
size_t footer;
size_t length;
footer = Stream_GetPosition(s);
length = footer - header;
Stream_SetPosition(s, header);
rdp_write_capability_set_header(s, (UINT16)length, type);
Stream_SetPosition(s, footer);
} | 0 | [
"CWE-119",
"CWE-125"
] | FreeRDP | 3627aaf7d289315b614a584afb388f04abfb5bbf | 156,038,106,661,463,630,000,000,000,000,000,000,000 | 10 | Fixed #6011: Bounds check in rdp_read_font_capability_set |
static void destruct(struct dce110_resource_pool *pool)
{
unsigned int i;
for (i = 0; i < pool->base.pipe_count; i++) {
if (pool->base.opps[i] != NULL)
dce110_opp_destroy(&pool->base.opps[i]);
if (pool->base.transforms[i] != NULL)
dce100_transform_destroy(&pool->base.transforms[i]);
if (pool->base.ipps... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 198,325,938,553,345,170,000,000,000,000,000,000,000 | 65 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
CNF_GetBindCommandPath(void)
{
return bind_cmd_path;
} | 0 | [
"CWE-59"
] | chrony | e18903a6b56341481a2e08469c0602010bf7bfe3 | 182,601,152,192,316,920,000,000,000,000,000,000,000 | 4 | switch to new util file functions
Replace all fopen(), rename(), and unlink() calls with the new util
functions. |
static Status Compute(OpKernelContext* context,
const typename TTypes<T, 1>::ConstTensor& sorted_inputs,
const typename TTypes<T, 1>::ConstTensor& values,
int batch_size, int num_inputs, int num_values,
typename TTypes<Out... | 0 | [
"CWE-125",
"CWE-369"
] | tensorflow | 42459e4273c2e47a3232cc16c4f4fff3b3a35c38 | 61,771,609,138,122,050,000,000,000,000,000,000,000 | 19 | Prevent CHECK-fail/heap OOB in UpperBound and LowerBound
PiperOrigin-RevId: 387738073
Change-Id: Iee74de95ddad18440d052a75a5a1cb67544f490a |
sctp_disposition_t sctp_sf_unk_chunk(struct net *net,
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *unk_chunk = arg;
struct sctp_chunk *err_chunk;
sctp_chunkhdr_t *... | 0 | [
"CWE-125"
] | linux | bf911e985d6bbaa328c20c3e05f4eb03de11fdd6 | 100,216,742,528,058,250,000,000,000,000,000,000,000 | 65 | sctp: validate chunk len before actually using it
Andrey Konovalov reported that KASAN detected that SCTP was using a slab
beyond the boundaries. It was caused because when handling out of the
blue packets in function sctp_sf_ootb() it was checking the chunk len
only after already processing the first chunk, validatin... |
static int http_handshake(URLContext *c)
{
int ret, err, new_location;
HTTPContext *ch = c->priv_data;
URLContext *cl = ch->hd;
switch (ch->handshake_step) {
case LOWER_PROTO:
av_log(c, AV_LOG_TRACE, "Lower protocol\n");
if ((ret = ffurl_handshake(cl)) > 0)
return 2 + ret... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 2a05c8f813de6f2278827734bf8102291e7484aa | 116,495,228,742,814,690,000,000,000,000,000,000,000 | 35 | http: make length/offset-related variables unsigned.
Fixes #5992, reported and found by Paul Cher <paulcher@icloud.com>. |
xfs_buf_unlock(
struct xfs_buf *bp)
{
XB_CLEAR_OWNER(bp);
up(&bp->b_sema);
trace_xfs_buf_unlock(bp, _RET_IP_);
} | 0 | [
"CWE-20",
"CWE-703"
] | linux | eb178619f930fa2ba2348de332a1ff1c66a31424 | 212,370,903,280,569,600,000,000,000,000,000,000,000 | 8 | xfs: fix _xfs_buf_find oops on blocks beyond the filesystem end
When _xfs_buf_find is passed an out of range address, it will fail
to find a relevant struct xfs_perag and oops with a null
dereference. This can happen when trying to walk a filesystem with a
metadata inode that has a partially corrupted extent map (i.e.... |
UnicodeString __fastcall TCustomCommandOptionsDialog::HistoryKey(const TCustomCommandType::TOption & Option)
{
UnicodeString Result = FCommand->GetOptionKey(Option, FSite);
Result = CustomWinConfiguration->GetValidHistoryKey(Result);
return L"CustomCommandOption_" + Result;
}
| 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 223,590,928,572,494,100,000,000,000,000,000,000,000 | 6 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
static unsigned compute_avg_bitrate(MOVTrack *track)
{
uint64_t size = 0;
int i;
if (!track->track_duration)
return 0;
for (i = 0; i < track->entry; i++)
size += track->cluster[i].size;
return size * 8 * track->timescale / track->track_duration;
} | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 65,022,364,898,237,460,000,000,000,000,000,000,000 | 10 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
void InstanceKlass::print_on(outputStream* st) const {
assert(is_klass(), "must be klass");
Klass::print_on(st);
st->print(BULLET"instance size: %d", size_helper()); st->cr();
st->print(BULLET"klass size: %d", size()); st->cr();
st->print(BULLET... | 0 | [] | jdk11u-dev | 41825fa33d605f8501164f9296572e4378e8183b | 225,390,009,774,354,750,000,000,000,000,000,000,000 | 118 | 8270386: Better verification of scan methods
Reviewed-by: mbaesken
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
R_API int r_str_path_unescape(char *path) {
int i;
for (i = 0; path[i]; i++) {
if (path[i] != '\\') {
continue;
}
if (path[i + 1] == ' ') {
path[i] = ' ';
memmove (path + i + 1, path + i + 2, strlen (path + i + 2) + 1);
}
}
return i;
} | 0 | [
"CWE-78"
] | radare2 | 04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9 | 203,320,560,524,391,380,000,000,000,000,000,000,000 | 15 | Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being creat... |
void usage(const char *progname)
{
const char* progname_real; /* contains the real name of the program */
/* (without path) */
progname_real = strrchr(progname, '/');
if (progname_real == NULL) /* no path in progname: use progname */
{
progname_real = progname;
... | 0 | [
"CWE-287",
"CWE-787"
] | AESCrypt | 68761851b595e96c68c3f46bfc21167e72c6a22c | 55,454,474,589,606,820,000,000,000,000,000,000,000 | 21 | Fixed security issue with passwords entered via a prompt |
SProcXkbGetControls(ClientPtr client)
{
REQUEST(xkbGetControlsReq);
swaps(&stuff->length);
REQUEST_SIZE_MATCH(xkbGetControlsReq);
swaps(&stuff->deviceSpec);
return ProcXkbGetControls(client);
} | 0 | [
"CWE-191"
] | xserver | 144849ea27230962227e62a943b399e2ab304787 | 197,275,725,260,796,380,000,000,000,000,000,000,000 | 9 | Fix XkbSelectEvents() integer underflow
CVE-2020-14361 ZDI-CAN 11573
This vulnerability was discovered by:
Jan-Niklas Sohn working with Trend Micro Zero Day Initiative
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> |
int kvm_is_error_hva(unsigned long addr)
{
return addr == bad_hva();
} | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 279,057,527,032,155,770,000,000,000,000,000,000,000 | 4 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
pdf14_copy_planes(gx_device * dev, const byte * data, int data_x, int raster,
gx_bitmap_id id, int x, int y, int w, int h, int plane_height)
{
pdf14_device *pdev = (pdf14_device *)dev;
#if RAW_DUMP
pdf14_ctx *ctx = pdev->ctx;
#endif
pdf14_buf *buf = pdev->ctx->stack;
int xo = x;
in... | 0 | [] | ghostpdl | c432131c3fdb2143e148e8ba88555f7f7a63b25e | 182,629,850,104,626,900,000,000,000,000,000,000,000 | 54 | Bug 699661: Avoid sharing pointers between pdf14 compositors
If a copdevice is triggered when the pdf14 compositor is the device, we make
a copy of the device, then throw an error because, by default we're only allowed
to copy the device prototype - then freeing it calls the finalize, which frees
several pointers shar... |
inline std::shared_ptr<Ope> ref(const Grammar &grammar, const std::string &name,
const char *s, bool is_macro,
const std::vector<std::shared_ptr<Ope>> &args) {
return std::make_shared<Reference>(grammar, name, s, is_macro, args);
} | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 322,901,283,502,175,870,000,000,000,000,000,000,000 | 5 | Fix #122 |
ASN1_INTEGER *ASN1_INTEGER_dup(const ASN1_INTEGER *x)
{
return M_ASN1_INTEGER_dup(x);
} | 0 | [
"CWE-119"
] | openssl | 3661bb4e7934668bd99ca777ea8b30eedfafa871 | 238,118,335,426,083,100,000,000,000,000,000,000,000 | 4 | Fix encoding bug in i2c_ASN1_INTEGER
Fix bug where i2c_ASN1_INTEGER mishandles zero if it is marked as
negative.
Thanks to Huzaifa Sidhpurwala <huzaifas@redhat.com> and
Hanno Böck <hanno@hboeck.de> for reporting this issue.
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit a0eed48d37a4b7beea0c966... |
static int ZEND_FASTCALL ZEND_INIT_ARRAY_SPEC_CONST_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
array_init(&EX_T(opline->result.u.var).tmp_var);
if (IS_CONST == IS_UNUSED) {
ZEND_VM_NEXT_OPCODE();
#if 0 || IS_CONST != IS_UNUSED
} else {
return ZEND_ADD_ARRAY_ELEMENT_SPEC_CONST_CV_HAND... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 162,422,443,100,239,300,000,000,000,000,000,000,000 | 13 | - 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 int exif_scan_thumbnail(image_info_type *ImageInfo)
{
uchar c, *data = (uchar*)ImageInfo->Thumbnail.data;
int n, marker;
size_t length=2, pos=0;
jpeg_sof_info sof_info;
if (!data || ImageInfo->Thumbnail.size < 4) {
return FALSE; /* nothing to do here */
}
if (memcmp(dat... | 0 | [
"CWE-125"
] | php-src | f22101c8308669bb63c03a73a2cac2408d844f38 | 156,974,375,812,534,400,000,000,000,000,000,000,000 | 86 | Fix bug #78222 (heap-buffer-overflow on exif_scan_thumbnail)
(cherry picked from commit dea2989ab8ba87a6180af497b2efaf0527e985c5) |
build_overlap_sched_groups(struct sched_domain *sd, int cpu)
{
struct sched_group *first = NULL, *last = NULL, *groups = NULL, *sg;
const struct cpumask *span = sched_domain_span(sd);
struct cpumask *covered = sched_domains_tmpmask;
struct sd_data *sdd = sd->private;
struct sched_domain *sibling;
int i;
cpumask... | 0 | [
"CWE-119"
] | linux | 29d6455178a09e1dc340380c582b13356227e8df | 200,313,818,269,126,860,000,000,000,000,000,000,000 | 73 | sched: panic on corrupted stack end
Until now, hitting this BUG_ON caused a recursive oops (because oops
handling involves do_exit(), which calls into the scheduler, which in
turn raises an oops), which caused stuff below the stack to be
overwritten until a panic happened (e.g. via an oops in interrupt
context, cause... |
GF_Box *unkn_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_UnknownBox, GF_ISOM_BOX_TYPE_UNKNOWN);
return (GF_Box *) tmp;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 224,069,400,651,250,340,000,000,000,000,000,000,000 | 5 | fixed #1587 |
inline void Slice(const tflite::SliceParams& op_params,
const RuntimeShape& input_shape, const TfLiteTensor* input,
const RuntimeShape& output_shape, TfLiteTensor* output) {
SequentialTensorWriter<T> writer(input, output);
return Slice(op_params, input_shape, output_shape, &write... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 210,914,700,246,844,740,000,000,000,000,000,000,000 | 6 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
GF_Err trgt_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_TrackGroupTypeBox *ptr = (GF_TrackGroupTypeBox *) s;
if (!s) return GF_BAD_PARAM;
s->type = ptr->group_type;
e = gf_isom_full_box_write(s, bs);
s->type = GF_ISOM_BOX_TYPE_TRGT;
if (e) return e;
gf_bs_write_u32(bs, ptr->track_group_id);
return GF... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 268,689,556,168,978,320,000,000,000,000,000,000,000 | 12 | fixed #2255 |
static int mov_create_dvd_sub_decoder_specific_info(MOVTrack *track,
AVStream *st)
{
int i, width = 720, height = 480;
int have_palette = 0, have_size = 0;
uint32_t palette[16];
char *cur = st->codecpar->extradata;
while (cur && *cur) {
if... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 16,741,796,368,288,344,000,000,000,000,000,000,000 | 48 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
tiff_read (thandle_t handle, tdata_t buf, tsize_t size)
{
TiffContext *context = (TiffContext *)handle;
if (context->pos + size > context->used)
return 0;
memcpy (buf, context->buffer + context->pos, size);
context->pos += size;
return size;
} | 0 | [
"CWE-20"
] | gdk-pixbuf | 3bac204e0d0241a0d68586ece7099e6acf0e9bea | 147,826,946,312,270,850,000,000,000,000,000,000,000 | 11 | Initial stab at getting the focus code to work.
Fri Jun 1 18:54:47 2001 Jonathan Blandford <jrb@redhat.com>
* gtk/gtktreeview.c: (gtk_tree_view_focus): Initial stab at
getting the focus code to work.
(gtk_tree_view_class_init): Add a bunch of keybindings.
* gtk/gtktreeviewcolumn.c
(gtk_tree_view_column_set_c... |
QuicHttpIntegrationTest()
: HttpIntegrationTest(Http::CodecClient::Type::HTTP3, GetParam().first,
ConfigHelper::quicHttpProxyConfig()),
supported_versions_([]() {
if (GetParam().second == QuicVersionType::GquicQuicCrypto) {
return quic::CurrentSupportedV... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 330,069,882,784,763,350,000,000,000,000,000,000,000 | 17 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
static bool fix_sql_log_bin_after_update(sys_var *self, THD *thd,
enum_var_type type)
{
DBUG_ASSERT(type == OPT_SESSION);
if (thd->variables.sql_log_bin)
thd->variables.option_bits |= OPTION_BIN_LOG;
else
thd->variables.option_bits &= ~OPTION_BIN_LOG;
return FA... | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 259,348,617,866,505,850,000,000,000,000,000,000,000 | 12 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
list_one_var_a(
char *prefix,
char_u *name,
int type,
char_u *string,
int *first) // when TRUE clear rest of screen and set to FALSE
{
// don't use msg() or msg_attr() to avoid overwriting "v:statusmsg"
msg_start();
msg_puts(prefix);
if (name != NULL) // "a:" vars don't have a nam... | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 5,179,044,178,194,318,600,000,000,000,000,000,000 | 43 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
bool run(OperationContext* txn,
const string& dbname,
BSONObj& cmdObj,
int options,
string& errmsg,
BSONObjBuilder& result) {
RoleName roleName;
Status status = auth::parseDropRoleCommand(cmdObj, dbname, &roleName);
if (!status... | 0 | [
"CWE-613"
] | mongo | 64d8e9e1b12d16b54d6a592bae8110226c491b4e | 49,929,140,739,239,370,000,000,000,000,000,000,000 | 124 | SERVER-38984 Validate unique User ID on UserCache hit
(cherry picked from commit e55d6e2292e5dbe2f97153251d8193d1cc89f5d7) |
const Type_handler *cast_to_int_type_handler() const
{
return real_type_handler()->cast_to_int_type_handler();
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 122,902,052,910,567,050,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 ... |
PJ_DEF(struct pjsua_data*) pjsua_get_var(void)
{
return &pjsua_var;
} | 0 | [
"CWE-120",
"CWE-787"
] | pjproject | d27f79da11df7bc8bb56c2f291d71e54df8d2c47 | 60,771,928,892,248,730,000,000,000,000,000,000,000 | 4 | Use PJ_ASSERT_RETURN() on pjsip_auth_create_digest() and pjsua_init_tpselector() (#3009)
* Use PJ_ASSERT_RETURN on pjsip_auth_create_digest
* Use PJ_ASSERT_RETURN on pjsua_init_tpselector()
* Fix incorrect check.
* Add return value to pjsip_auth_create_digest() and pjsip_auth_create_digestSHA256()
* Modifi... |
static int sco_sock_sendmsg(struct socket *sock, struct msghdr *msg,
size_t len)
{
struct sock *sk = sock->sk;
void *buf;
int err;
BT_DBG("sock %p, sk %p", sock, sk);
err = sock_error(sk);
if (err)
return err;
if (msg->msg_flags & MSG_OOB)
return -EOPNOTSUPP;
buf = kmalloc(len, GFP_KERNEL);
if (... | 1 | [
"CWE-416"
] | linux | 0771cbb3b97d3c1d68eecd7f00055f599954c34e | 21,377,726,222,357,843,000,000,000,000,000,000,000 | 36 | Bluetooth: SCO: Replace use of memcpy_from_msg with bt_skb_sendmsg
This makes use of bt_skb_sendmsg instead of allocating a different
buffer to be used with memcpy_from_msg which cause one extra copy.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
parse_wbxml_attribute_list_defined (proto_tree *tree, tvbuff_t *tvb,
guint32 offset, guint32 str_tbl, guint8 level, guint8 *codepage_attr,
const wbxml_decoding *map)
{
guint32 tvb_len = tvb_reported_length (tvb);
guint32 off = offset, last_off;
guint32 len;
guint str_len;
guin... | 0 | [
"CWE-399",
"CWE-119",
"CWE-787"
] | wireshark | b8e0d416898bb975a02c1b55883342edc5b4c9c0 | 159,226,532,917,557,890,000,000,000,000,000,000,000 | 219 | WBXML: add a basic sanity check for offset overflow
This is a naive approach allowing to detact that something went wrong,
without the need to replace all proto_tree_add_text() calls as what was
done in master-2.0 branch.
Bug: 12408
Change-Id: Ia14905005e17ae322c2fc639ad5e491fa08b0108
Reviewed-on: https://code.wiresh... |
GF_Err ctts_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
u32 i;
GF_CompositionOffsetBox *ptr = (GF_CompositionOffsetBox *)s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u32(bs, ptr->nb_entries);
for (i=0; i<ptr->nb_entries; i++ ) {
gf_bs_write_u32(bs, ptr->entries[i].sampleCount);
... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 11,518,449,399,074,972,000,000,000,000,000,000,000 | 19 | fixed #1587 |
GF_Err mvex_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem)
{
GF_MovieExtendsBox *ptr = (GF_MovieExtendsBox *)s;
switch (a->type) {
case GF_ISOM_BOX_TYPE_TREX:
BOX_FIELD_LIST_ASSIGN(TrackExList)
return GF_OK;
case GF_ISOM_BOX_TYPE_TREP:
BOX_FIELD_LIST_ASSIGN(TrackExPropList)
return GF_OK;
case GF_ISOM_BOX... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 146,994,164,559,086,400,000,000,000,000,000,000,000 | 17 | fixed #1757 |
START_TEST(strsanitize_test)
{
struct strsanitize_test {
const char *string;
const char *expected;
} tests[] = {
{ "foobar", "foobar" },
{ "", "" },
{ "%", "%%" },
{ "%%%%", "%%%%%%%%" },
{ "x %s", "x %%s" },
{ "x %", "x %%" },
{ "%sx", "%%sx" },
{ "%s%s", "%%s%%s" },
{ NULL, NULL },
};
for (... | 0 | [
"CWE-134"
] | libinput | a423d7d3269dc32a87384f79e29bb5ac021c83d1 | 299,307,241,961,411,940,000,000,000,000,000,000,000 | 23 | 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... |
static void xfrm_policy_fini(struct net *net)
{
struct xfrm_pol_inexact_bin *b, *t;
unsigned int sz;
int dir;
flush_work(&net->xfrm.policy_hash_work);
#ifdef CONFIG_XFRM_SUB_POLICY
xfrm_policy_flush(net, XFRM_POLICY_TYPE_SUB, false);
#endif
xfrm_policy_flush(net, XFRM_POLICY_TYPE_MAIN, false);
WARN_ON(!list_em... | 0 | [
"CWE-703"
] | linux | f85daf0e725358be78dfd208dea5fd665d8cb901 | 308,677,671,768,059,400,000,000,000,000,000,000,000 | 34 | xfrm: xfrm_policy: fix a possible double xfrm_pols_put() in xfrm_bundle_lookup()
xfrm_policy_lookup() will call xfrm_pol_hold_rcu() to get a refcount of
pols[0]. This refcount can be dropped in xfrm_expand_policies() when
xfrm_expand_policies() return error. pols[0]'s refcount is balanced in
here. But xfrm_bundle_look... |
dlz_ssumatch(const char *signer, const char *name, const char *tcpaddr,
const char *type, const char *key, uint32_t keydatalen,
unsigned char *keydata, void *dbdata)
{
struct dlz_example_data *state = (struct dlz_example_data *)dbdata;
UNUSED(tcpaddr);
UNUSED(type);
UNUSED(key);
UNUSED(keydatalen);
U... | 0 | [
"CWE-732"
] | bind9 | 34348d9ee4db15307c6c42db294419b4df569f76 | 167,568,515,660,512,560,000,000,000,000,000,000,000 | 23 | denied axfr requests were not effective for writable DLZ zones
(cherry picked from commit d9077cd0038e59726e1956de18b4b7872038a283) |
static QIOChannel *nbd_negotiate_handle_starttls(NBDClient *client,
uint32_t length)
{
QIOChannel *ioc;
QIOChannelTLS *tioc;
struct NBDTLSHandshakeData data = { 0 };
TRACE("Setting up TLS");
ioc = client->ioc;
if (length) {
if (nbd_negoti... | 1 | [
"CWE-20"
] | qemu | 2b0bbc4f8809c972bad134bc1a2570dbb01dea0b | 168,285,009,249,941,430,000,000,000,000,000,000,000 | 51 | nbd/server: get rid of nbd_negotiate_read and friends
Functions nbd_negotiate_{read,write,drop_sync} were introduced in
1a6245a5b, when nbd_rwv (was nbd_wr_sync) was working through
qemu_co_sendv_recvv (the path is nbd_wr_sync -> qemu_co_{recv/send} ->
qemu_co_send_recv -> qemu_co_sendv_recvv), which just yields, with... |
CImg<T> get_fill(const T& val0, const T& val1, const T& val2, const T& val3, const T& val4, const T& val5,
const T& val6, const T& val7, const T& val8, const T& val9, const T& val10, const T& val11) const {
return CImg<T>(_width,_height,_depth,_spectrum).fill(val0,val1,val2,val3,val4,val5... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 330,907,366,635,895,040,000,000,000,000,000,000,000 | 5 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
_archive_entry_copy_file_info (struct archive_entry *entry,
GFileInfo *info,
SaveData *save_data)
{
int filetype;
char *username;
char *groupname;
gint64 id;
switch (g_file_info_get_file_type (info)) {
case G_FILE_TYPE_REGULAR:
filetype = AE_IFREG;
break;
... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 292,767,219,398,358,800,000,000,000,000,000,000,000 | 76 | libarchive: sanitize filenames before extracting |
TS_RESP *TS_RESP_create_response(TS_RESP_CTX *ctx, BIO *req_bio)
{
ASN1_OBJECT *policy;
TS_RESP *response;
int result = 0;
TS_RESP_CTX_init(ctx);
/* Creating the response object. */
if (!(ctx->response = TS_RESP_new()))
{
TSerr(TS_F_TS_RESP_CREATE_RESPONSE, ERR_R_MALLOC_FAILURE);
goto end;
}
/* Pars... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 244,369,556,427,844,600,000,000,000,000,000,000,000 | 70 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
static int compare_checksum(git_index *index)
{
int fd;
ssize_t bytes_read;
git_oid checksum = {{ 0 }};
if ((fd = p_open(index->index_file_path, O_RDONLY)) < 0)
return fd;
if (p_lseek(fd, -20, SEEK_END) < 0) {
p_close(fd);
giterr_set(GITERR_OS, "failed to seek to end of file");
return -1;
}
bytes_read... | 0 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3db1af1f370295ad5355b8f64b865a2a357bcac0 | 100,014,260,065,125,160,000,000,000,000,000,000,000 | 23 | index: error out on unreasonable prefix-compressed path lengths
When computing the complete path length from the encoded
prefix-compressed path, we end up just allocating the complete path
without ever checking what the encoded path length actually is. This can
easily lead to a denial of service by just encoding an un... |
static void nbd_client_receive_next_request(NBDClient *client)
{
if (!client->recv_coroutine && client->nb_requests < MAX_NBD_REQUESTS) {
nbd_client_get(client);
client->recv_coroutine = qemu_coroutine_create(nbd_trip, client);
aio_co_schedule(client->exp->ctx, client->recv_coroutine);
}... | 0 | [
"CWE-20"
] | qemu | 2b0bbc4f8809c972bad134bc1a2570dbb01dea0b | 179,537,854,079,240,400,000,000,000,000,000,000,000 | 8 | nbd/server: get rid of nbd_negotiate_read and friends
Functions nbd_negotiate_{read,write,drop_sync} were introduced in
1a6245a5b, when nbd_rwv (was nbd_wr_sync) was working through
qemu_co_sendv_recvv (the path is nbd_wr_sync -> qemu_co_{recv/send} ->
qemu_co_send_recv -> qemu_co_sendv_recvv), which just yields, with... |
static void vmxnet3_pci_realize(PCIDevice *pci_dev, Error **errp)
{
DeviceState *dev = DEVICE(pci_dev);
VMXNET3State *s = VMXNET3(pci_dev);
int ret;
VMW_CBPRN("Starting init...");
memory_region_init_io(&s->bar0, OBJECT(s), &b0_ops, s,
"vmxnet3-b0", VMXNET3_PT_REG_SIZE);
... | 0 | [
"CWE-416"
] | qemu | 6c352ca9b4ee3e1e286ea9e8434bd8e69ac7d0d8 | 309,775,713,265,412,900,000,000,000,000,000,000,000 | 52 | net: vmxnet3: check for device_active before write
Vmxnet3 device emulator does not check if the device is active,
before using it for write. It leads to a use after free issue,
if the vmxnet3_io_bar0_write routine is called after the device is
deactivated. Add check to avoid it.
Reported-by: Li Qiang <liqiang6-s@360... |
static int dsa_param_decode(EVP_PKEY *pkey,
const unsigned char **pder, int derlen)
{
DSA *dsa;
if ((dsa = d2i_DSAparams(NULL, pder, derlen)) == NULL) {
DSAerr(DSA_F_DSA_PARAM_DECODE, ERR_R_DSA_LIB);
return 0;
}
EVP_PKEY_assign_DSA(pkey, dsa);
return 1;
} | 0 | [] | openssl | ab4a81f69ec88d06c9d8de15326b9296d7f498ed | 218,827,760,983,376,900,000,000,000,000,000,000,000 | 12 | Remove broken DSA private key workarounds.
Remove old code that handled various invalid DSA formats in ancient
software.
This also fixes a double free bug when parsing malformed DSA private keys.
Thanks to Adam Langley (Google/BoringSSL) for discovering this bug using
libFuzzer.
CVE-2016-0705
Reviewed-by: Emilia K... |
static int rmem_swiotlb_device_init(struct reserved_mem *rmem,
struct device *dev)
{
struct io_tlb_mem *mem = rmem->priv;
unsigned long nslabs = rmem->size >> IO_TLB_SHIFT;
/*
* Since multiple devices can share the same pool, the private data,
* io_tlb_mem struct, will be initialized by the first device... | 0 | [
"CWE-200",
"CWE-401"
] | linux | aa6f8dcbab473f3a3c7454b74caa46d36cdc5d13 | 227,666,950,505,328,500,000,000,000,000,000,000,000 | 38 | swiotlb: rework "fix info leak with DMA_FROM_DEVICE"
Unfortunately, we ended up merging an old version of the patch "fix info
leak with DMA_FROM_DEVICE" instead of merging the latest one. Christoph
(the swiotlb maintainer), he asked me to create an incremental fix
(after I have pointed this out the mix up, and asked h... |
static int vcpu_enter_guest(struct kvm_vcpu *vcpu)
{
int r;
bool req_int_win =
dm_request_for_irq_injection(vcpu) &&
kvm_cpu_accept_dm_intr(vcpu);
fastpath_t exit_fastpath;
bool req_immediate_exit = false;
/* Forbid vmenter if vcpu dirty ring is soft-full */
if (unlikely(vcpu->kvm->dirty_ring_size &&
... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 9,594,872,147,100,416,000,000,000,000,000,000,000 | 354 | 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... |
void auth_request_continue(struct auth_request *request,
const unsigned char *data, size_t data_size)
{
i_assert(request->state == AUTH_REQUEST_STATE_MECH_CONTINUE);
if (request->fields.successful) {
auth_request_success(request, "", 0);
return;
}
if (auth_request_fail_on_nuls(request, data, data_size))... | 0 | [
"CWE-284"
] | core | 7bad6a24160e34bce8f10e73dbbf9e5fbbcd1904 | 253,851,666,486,446,440,000,000,000,000,000,000,000 | 16 | 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... |
crypt_pw_md5_enc(const char *pwd)
{
return crypt_pw_enc_by_hash(pwd, CRYPT_MD5);
} | 0 | [
"CWE-284"
] | 389-ds-base | aeb90eb0c41fc48541d983f323c627b2e6c328c7 | 115,301,176,155,952,400,000,000,000,000,000,000,000 | 4 | Issue 4817 - BUG - locked crypt accounts on import may allow all passwords (#4819)
Bug Description: Due to mishanding of short dbpwd hashes, the
crypt_r algorithm was misused and was only comparing salts
in some cases, rather than checking the actual content
of the password.
Fix Description: Stricter checks on d... |
BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartPtr (int size, void *data, int srcx, int srcy, int w,
int h)
{
_noLibzError();
return NULL;
} | 0 | [
"CWE-703",
"CWE-189",
"CWE-681"
] | libgd | 2bb97f407c1145c850416a3bfbcc8cf124e68a19 | 207,328,059,558,276,900,000,000,000,000,000,000,000 | 6 | gd2: handle corrupt images better (CVE-2016-3074)
Make sure we do some range checking on corrupted chunks.
Thanks to Hans Jerry Illikainen <hji@dyntopia.com> for indepth report
and reproducer information. Made for easy test case writing :). |
vm_fault_t kvm_arch_vcpu_fault(struct kvm_vcpu *vcpu, struct vm_fault *vmf)
{
#ifdef CONFIG_KVM_S390_UCONTROL
if ((vmf->pgoff == KVM_S390_SIE_PAGE_OFFSET)
&& (kvm_is_ucontrol(vcpu->kvm))) {
vmf->page = virt_to_page(vcpu->arch.sie_block);
get_page(vmf->page);
return 0;
}
#endif
return VM_FAULT_SIGBUS;
} | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 137,099,776,067,883,630,000,000,000,000,000,000,000 | 12 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
static void bios_supports_mode(const char *pmutils_bin, const char *pmutils_arg,
const char *sysfile_str, Error **errp)
{
Error *local_err = NULL;
char *pmutils_path;
pid_t pid;
int status;
pmutils_path = g_find_program_in_path(pmutils_bin);
pid = fork();
if ... | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 70,902,654,017,751,410,000,000,000,000,000,000,000 | 83 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... |
void xml_elem_serialize_to_stream(xml_element *el, FILE *output, XML_ELEM_OUTPUT_OPTIONS options)
{
xml_element_serialize(el, file_out_fptr, (void *)output, options, 0);
} | 0 | [
"CWE-125"
] | php-src | 780ff63c377dc79de2c04d6b341913ab0102135b | 21,866,422,716,683,196,000,000,000,000,000,000,000 | 4 | MFH: Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error
when given bad data). |
static void kvm_write_system_time(struct kvm_vcpu *vcpu, gpa_t system_time,
bool old_msr, bool host_initiated)
{
struct kvm_arch *ka = &vcpu->kvm->arch;
if (vcpu->vcpu_id == 0 && !host_initiated) {
if (ka->boot_vcpu_runs_old_kvmclock != old_msr)
kvm_make_request(KVM_REQ_MASTERCLOCK_UPDATE, vcpu);
ka->b... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 324,773,289,074,704,230,000,000,000,000,000,000,000 | 27 | 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... |
iptos2str(int iptos)
{
int i;
static char iptos_str[sizeof "0xff"];
for (i = 0; ipqos[i].name != NULL; i++) {
if (ipqos[i].value == iptos)
return ipqos[i].name;
}
snprintf(iptos_str, sizeof iptos_str, "0x%02x", iptos);
return iptos_str;
} | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 104,844,346,281,137,820,000,000,000,000,000,000,000 | 12 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
static void oz_clean_endpoints_for_config(struct usb_hcd *hcd,
struct oz_port *port)
{
struct oz_hcd *ozhcd = port->ozhcd;
int i;
oz_dbg(ON, "Deleting endpoints for configuration\n");
for (i = 0; i < port->num_iface; i++)
oz_clean_endpoints_for_interface(hcd, port, i);
spin_lock_bh(&ozhcd->hcd_lock);
if (po... | 0 | [
"CWE-703",
"CWE-189"
] | linux | b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c | 322,387,049,895,210,300,000,000,000,000,000,000,000 | 18 | ozwpan: Use unsigned ints to prevent heap overflow
Using signed integers, the subtraction between required_size and offset
could wind up being negative, resulting in a memcpy into a heap buffer
with a negative length, resulting in huge amounts of network-supplied
data being copied into the heap, which could potentiall... |
st_select_lex* return_after_parsing() { return return_to; } | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 16,719,934,938,532,096,000,000,000,000,000,000,000 | 1 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
passGetAttributes(CharsString *passLine, int *passLinepos,
TranslationTableCharacterAttributes *passAttributes, FileInfo *passNested) {
int more = 1;
*passAttributes = 0;
while (more) {
switch (passLine->chars[*passLinepos]) {
case pass_any:
*passAttributes = 0xffffffff;
break;
case pass_digit:
*pas... | 0 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 234,450,747,300,245,070,000,000,000,000,000,000,000 | 61 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
static uint32_t lan9118_readw(void *opaque, hwaddr offset)
{
lan9118_state *s = (lan9118_state *)opaque;
uint32_t val;
if (s->read_word_prev_offset != (offset & ~0x3)) {
/* New offset, reset word counter */
s->read_word_n = 0;
s->read_word_prev_offset = offset & ~0x3;
}
s->... | 0 | [
"CWE-835"
] | qemu | 37cee01784ff0df13e5209517e1b3594a5e792d1 | 306,480,148,144,769,980,000,000,000,000,000,000,000 | 27 | lan9118: 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.co... |
void Gfx::opSetStrokeGray(Object args[], int numArgs) {
GfxColor color;
state->setStrokePattern(NULL);
state->setStrokeColorSpace(new GfxDeviceGrayColorSpace());
out->updateStrokeColorSpace(state);
color.c[0] = dblToCol(args[0].getNum());
state->setStrokeColor(&color);
out->updateStrokeColor(state);
} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 37,172,779,214,410,853,000,000,000,000,000,000,000 | 10 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
CIRCNetwork::CIRCNetwork(CUser* pUser, const CIRCNetwork& Network)
: CIRCNetwork(pUser, "") {
Clone(Network);
} | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 66,240,263,263,921,870,000,000,000,000,000,000,000 | 4 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * value_ptr, int value_len, char *offset_base, size_t IFDlength, size_t displacement)
{
size_t i;
int de, section_index = SECTION_MAKERNOTE;
int NumDirEntries, old_motorola_intel;
#ifdef KALLE_0
int offset_diff;
#endif
const maker_note_type ... | 1 | [
"CWE-125"
] | php-src | a1631ac57b853edd81431e57c266ec813e180acd | 102,633,146,521,162,190,000,000,000,000,000,000,000 | 108 | Fix bug #77753 - Heap-buffer-overflow in php_ifd_get32s |
static void ide_flush_cb(void *opaque, int ret)
{
IDEState *s = opaque;
s->pio_aiocb = NULL;
if (ret == -ECANCELED) {
return;
}
if (ret < 0) {
/* XXX: What sector number to set here? */
if (ide_handle_rw_error(s, -ret, IDE_RETRY_FLUSH)) {
return;
}
}... | 0 | [
"CWE-399"
] | qemu | 3251bdcf1c67427d964517053c3d185b46e618e8 | 210,114,916,061,853,400,000,000,000,000,000,000,000 | 23 | ide: Correct handling of malformed/short PRDTs
This impacts both BMDMA and AHCI HBA interfaces for IDE.
Currently, we confuse the difference between a PRDT having
"0 bytes" and a PRDT having "0 complete sectors."
When we receive an incomplete sector, inconsistent error checking
leads to an infinite loop wherein the c... |
static bool mpage_add_bh_to_extent(struct mpage_da_data *mpd, ext4_lblk_t lblk,
struct buffer_head *bh)
{
struct ext4_map_blocks *map = &mpd->map;
/* Buffer that doesn't need mapping for writeback? */
if (!buffer_dirty(bh) || !buffer_mapped(bh) ||
(!buffer_delay(bh) && !buffer_unwritten(bh))) {
/* So ... | 0 | [] | linux | 8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44 | 82,498,516,698,903,790,000,000,000,000,000,000,000 | 37 | ext4: fail ext4_iget for root directory if unallocated
If the root directory has an i_links_count of zero, then when the file
system is mounted, then when ext4_fill_super() notices the problem and
tries to call iput() the root directory in the error return path,
ext4_evict_inode() will try to free the inode on disk, b... |
const CImg<T>& _save_pnm(std::FILE *const file, const char *const filename,
const unsigned int bytes_per_pixel=0) const {
if (!file && !filename)
throw CImgArgumentException(_cimg_instance
"save_pnm(): Specified filename is (null).",
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 173,002,980,459,150,300,000,000,000,000,000,000,000 | 122 | Fix other issues in 'CImg<T>::load_bmp()'. |
PGTYPESinterval_from_asc(char *str, char **endptr)
{
interval *result = NULL;
fsec_t fsec;
struct tm tt,
*tm = &tt;
int dtype;
int nf;
char *field[MAXDATEFIELDS];
int ftype[MAXDATEFIELDS];
char lowstr[MAXDATELEN + MAXDATEFIELDS];
char *realptr;
char **ptr = (endptr != NULL) ? endptr : ... | 0 | [
"CWE-416",
"CWE-119"
] | postgres | 4318daecc959886d001a6e79c6ea853e8b1dfb4b | 272,715,004,712,729,200,000,000,000,000,000,000,000 | 57 | Fix handling of wide datetime input/output.
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone na... |
testcase_solverresult(Solver *solv, int resultflags)
{
Pool *pool = solv->pool;
int i, j;
Id p, op;
const char *s;
char *result;
Strqueue sq;
strqueue_init(&sq);
if ((resultflags & TESTCASE_RESULT_TRANSACTION) != 0)
{
Transaction *trans = solver_create_transaction(solv);
Queue q;
... | 0 | [
"CWE-120"
] | libsolv | 0077ef29eb46d2e1df2f230fc95a1d9748d49dec | 85,774,614,367,458,870,000,000,000,000,000,000,000 | 345 | testcase_read: error out if repos are added or the system is changed too late
We must not add new solvables after the considered map was created, the solver
was created, or jobs were added. We may not changed the system after jobs have
been added.
(Jobs may point inside the whatproviedes array, so we must not invalid... |
vte_terminal_emit_deiconify_window(VteTerminal *terminal)
{
_vte_debug_print(VTE_DEBUG_SIGNALS,
"Emitting `deiconify-window'.\n");
g_signal_emit_by_name(terminal, "deiconify-window");
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 167,239,882,248,599,020,000,000,000,000,000,000,000 | 6 | fix bug #548272
svn path=/trunk/; revision=2365 |
int X509_print(BIO *bp, X509 *x)
{
return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT);
} | 0 | [
"CWE-125"
] | openssl | d9d838ddc0ed083fb4c26dd067e71aad7c65ad16 | 295,589,245,104,394,100,000,000,000,000,000,000,000 | 4 | Fix a read buffer overrun in X509_aux_print().
The ASN1_STRING_get0_data(3) manual explitely cautions the reader
that the data is not necessarily NUL-terminated, and the function
X509_alias_set1(3) does not sanitize the data passed into it in any
way either, so we must assume the return value from X509_alias_get0(3)
i... |
static void plugin_del(struct st_plugin_int *plugin)
{
DBUG_ENTER("plugin_del");
mysql_mutex_assert_owner(&LOCK_plugin);
/* Free allocated strings before deleting the plugin. */
plugin_vars_free_values(plugin->system_vars);
restore_ptr_backup(plugin->nbackups, plugin->ptr_backup);
if (plugin->plugin_dl)
{... | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 194,113,026,892,771,160,000,000,000,000,000,000,000 | 18 | MDEV-26323 use-after-poison issue of MariaDB server |
*__dma_request_slave_channel_compat(const dma_cap_mask_t *mask,
dma_filter_fn fn, void *fn_param,
struct device *dev, char *name)
{
struct dma_chan *chan;
chan = dma_request_slave_channel(dev, name);
if (chan)
return chan;
return __dma_request_channel(mask, fn, fn_param);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 127,888,481,655,113,360,000,000,000,000,000,000,000 | 12 | 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... |
static int replmd_modify_la_add(struct ldb_module *module,
struct replmd_private *replmd_private,
struct replmd_replicated_request *ac,
struct ldb_message *msg,
struct ldb_message_element *el,
struct ldb_message_element *old_el,
const struct dsdb_attribute *schema_attr,
time_t t,
struct ... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 167,160,711,791,119,580,000,000,000,000,000,000,000 | 312 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
bool Item_direct_ref::get_date(MYSQL_TIME *ltime,ulonglong fuzzydate)
{
return (null_value=(*ref)->get_date(ltime,fuzzydate));
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 314,929,411,441,244,200,000,000,000,000,000,000,000 | 4 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
void fp_add_d(fp_int *a, fp_digit b, fp_int *c)
{
#ifndef WOLFSSL_SMALL_STACK
fp_int tmp;
fp_init(&tmp);
fp_set(&tmp, b);
fp_add(a, &tmp, c);
#else
int i;
fp_word t = b;
fp_copy(a, c);
for (i = 0; t != 0 && i < FP_SIZE && i < c->used; i++) {
t += c->dp[i];
c->dp[i] = (fp_digit)t;
... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 8,145,749,461,617,955,000,000,000,000,000,000,000 | 23 | 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. |
void InMatchExpression::_doSetCollator(const CollatorInterface* collator) {
_collator = collator;
_eltCmp = BSONElementComparator(BSONElementComparator::FieldNamesMode::kIgnore, _collator);
if (!std::is_sorted(_originalEqualityVector.begin(),
_originalEqualityVector.end(),
... | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 142,302,730,589,596,920,000,000,000,000,000,000,000 | 16 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
void svm_set_gif(struct vcpu_svm *svm, bool value)
{
if (value) {
/*
* If VGIF is enabled, the STGI intercept is only added to
* detect the opening of the SMI/NMI window; remove it now.
* Likewise, clear the VINTR intercept, we will set it
* again while processing KVM_REQ_EVENT if needed.
*/
if (vgi... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 274,662,606,024,634,300,000,000,000,000,000,000,000 | 31 | 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... |
_TIFFSwab16BitData(TIFF* tif, uint8* buf, tmsize_t cc)
{
(void) tif;
assert((cc & 1) == 0);
TIFFSwabArrayOfShort((uint16*) buf, cc/2);
} | 0 | [
"CWE-189"
] | libtiff | 0ba5d8814a17a64bdb8d9035f4c533f3f3f4b496 | 212,228,941,768,120,150,000,000,000,000,000,000,000 | 6 | * libtiff/tif_read.c: Fix out-of-bounds read on
memory-mapped files in TIFFReadRawStrip1() and TIFFReadRawTile1()
when stripoffset is beyond tmsize_t max value (reported by
Mathias Svensson) |
int cfg80211_testmode_reply(struct sk_buff *skb)
{
struct cfg80211_registered_device *rdev = ((void **)skb->cb)[0];
void *hdr = ((void **)skb->cb)[1];
struct nlattr *data = ((void **)skb->cb)[2];
if (WARN_ON(!rdev->testmode_info)) {
kfree_skb(skb);
return -EINVAL;
}
nla_nest_end(skb, data);
genlmsg_end(sk... | 0 | [
"CWE-362",
"CWE-119"
] | linux | 208c72f4fe44fe09577e7975ba0e7fa0278f3d03 | 197,289,934,772,040,620,000,000,000,000,000,000,000 | 15 | nl80211: fix check for valid SSID size in scan operations
In both trigger_scan and sched_scan operations, we were checking for
the SSID length before assigning the value correctly. Since the
memory was just kzalloc'ed, the check was always failing and SSID with
over 32 characters were allowed to go through.
This was... |
template<typename T>
inline CImg<_cimg_Tfloat> abs(const CImg<T>& instance) {
return instance.get_abs(); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 228,708,129,632,060,880,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
static void gch_transpose(struct SYMBOL *s)
{
int i2 = ((curvoice->ckey.sf - curvoice->okey.sf + 12) * 7) % 12;
char *o = s->text, *p = o, *q = o, *r;
// search the chord symbols
for (;;) {
if (!strchr("^_<>@", *p)) {
q = strchr(p, '\t');
if (q) {
r = strchr(p, '\n');
if (!r || q < r)
gch_tr1(... | 0 | [
"CWE-787"
] | abcm2ps | dc0372993674d0b50fedfbf7b9fad1239b8efc5f | 193,540,976,316,865,520,000,000,000,000,000,000,000 | 22 | fix: crash when too many accidentals in K: (signature + explicit)
Issue #17. |
join_read_first(JOIN_TAB *tab)
{
int error= 0;
TABLE *table=tab->table;
DBUG_ENTER("join_read_first");
DBUG_ASSERT(table->no_keyread ||
!table->covering_keys.is_set(tab->index) ||
table->file->keyread == tab->index);
tab->table->status=0;
tab->read_record.read_record_func= join_... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 309,084,581,902,200,270,000,000,000,000,000,000,000 | 25 | 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... |
void Magick::Image::pixelColor(const ssize_t x_,const ssize_t y_,
const Color &color_)
{
PixelInfo
packet;
Quantum
*pixel;
// Test arguments to ensure they are within the image.
if (y_ > (ssize_t) rows() || x_ > (ssize_t) columns())
throwExceptionExplicit(MagickCore::OptionError,
"Access o... | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 112,076,571,113,163,570,000,000,000,000,000,000,000 | 28 | Added missing return to avoid use after free. |
list_restrict6(
restrict_u * res,
struct info_restrict ** ppir
)
{
struct info_restrict * pir;
if (res->link != NULL)
list_restrict6(res->link, ppir);
pir = *ppir;
pir->addr6 = res->u.v6.addr;
pir->mask6 = res->u.v6.mask;
pir->v6_flag = 1;
pir->count = htonl(res->count);
pir->flags = htons(res->flags);... | 1 | [
"CWE-476"
] | ntp | 8a0c765f3c47633fa262356b0818788d1cf249b1 | 112,524,846,955,278,300,000,000,000,000,000,000,000 | 19 | [Bug 2939] reslist NULL pointer dereference
[Bug 2940] Stack exhaustion in recursive traversal of restriction list
-- these two where fixed together -- |
enum protocol_types smbXcli_conn_protocol(struct smbXcli_conn *conn)
{
return conn->protocol;
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 151,397,551,531,916,670,000,000,000,000,000,000,000 | 4 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
gdm_session_worker_authenticate_user (GdmSessionWorker *worker,
gboolean password_is_required,
GError **error)
{
int error_code;
int authentication_flags;
g_debug ("GdmSessionWorker: authenticating use... | 0 | [
"CWE-362"
] | gdm | dcdbaaa04012541ad2813cf83559d91d52f208b9 | 231,199,998,666,478,850,000,000,000,000,000,000,000 | 55 | session-worker: Don't switch back VTs until session is fully exited
There's a race condition on shutdown where the session worker is
switching VTs back to the initial VT at the same time as the session
exit is being processed.
This means that manager may try to start a login screen (because of
the VT switch) when aut... |
void mcheck_cpu_init(struct cpuinfo_x86 *c)
{
if (mca_cfg.disabled)
return;
if (__mcheck_cpu_ancient_init(c))
return;
if (!mce_available(c))
return;
if (__mcheck_cpu_cap_init() < 0 || __mcheck_cpu_apply_quirks(c) < 0) {
mca_cfg.disabled = true;
return;
}
if (mce_gen_pool_init()) {
mca_cfg.disabled... | 0 | [
"CWE-362"
] | linux | b3b7c4795ccab5be71f080774c45bbbcc75c2aaf | 17,006,732,066,274,135,000,000,000,000,000,000,000 | 30 | x86/MCE: Serialize sysfs changes
The check_interval file in
/sys/devices/system/machinecheck/machinecheck<cpu number>
directory is a global timer value for MCE polling. If it is changed by one
CPU, mce_restart() broadcasts the event to other CPUs to delete and restart
the MCE polling timer and __mcheck_cpu_init_ti... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.