func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
R_API bool r_io_bank_write_at(RIO *io, const ut32 bankid, ut64 addr, const ut8 *buf, int len) {
RIOBank *bank = r_io_bank_get (io, bankid);
r_return_val_if_fail (io && bank, false);
RIOSubMap fake_sm;
memset (&fake_sm, 0x00, sizeof (RIOSubMap));
fake_sm.itv.addr = addr;
fake_sm.itv.size = len;
RRBNode *node;
if... | 0 | [
"CWE-416"
] | radare2 | b5cb90b28ec71fda3504da04e3cc94a362807f5e | 60,662,633,991,269,310,000,000,000,000,000,000,000 | 39 | Prefer memleak over usaf in io.bank's rbtree bug ##crash
* That's a workaround, proper fix will come later
* Reproducer: bins/fuzzed/iobank-crash
* Reported by Akyne Choi via huntr.dev |
rb_event_length(struct ring_buffer_event *event)
{
switch (event->type_len) {
case RINGBUF_TYPE_PADDING:
if (rb_null_event(event))
/* undefined */
return -1;
return event->array[0] + RB_EVNT_HDR_SIZE;
case RINGBUF_TYPE_TIME_EXTEND:
return RB_LEN_TIME_EXTEND;
case RINGBUF_TYPE_TIME_STAMP:
return RB_... | 0 | [
"CWE-190"
] | linux-stable | 59643d1535eb220668692a5359de22545af579f6 | 340,196,997,075,475,300,000,000,000,000,000,000,000 | 23 | ring-buffer: Prevent overflow of size in ring_buffer_resize()
If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE
then the DIV_ROUND_UP() will return zero.
Here's the details:
# echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb
tracing_entries_write() processes this... |
static void yam_dotimer(struct timer_list *unused)
{
int i;
for (i = 0; i < NR_PORTS; i++) {
struct net_device *dev = yam_devs[i];
if (dev && netif_running(dev))
yam_arbitrate(dev);
}
yam_timer.expires = jiffies + HZ / 100;
add_timer(&yam_timer);
} | 0 | [
"CWE-401"
] | linux | 29eb31542787e1019208a2e1047bb7c76c069536 | 333,744,824,385,611,020,000,000,000,000,000,000,000 | 12 | yam: fix a memory leak in yam_siocdevprivate()
ym needs to be free when ym->cmd != SIOCYAMSMCS.
Fixes: 0781168e23a2 ("yam: fix a missing-check bug")
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
unsigned int zzlLength(unsigned char *zl) {
return ziplistLen(zl)/2;
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 63,671,212,423,526,875,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... |
SDL_GetPixelFormatName(Uint32 format)
{
switch (format) {
#define CASE(X) case X: return #X;
CASE(SDL_PIXELFORMAT_INDEX1LSB)
CASE(SDL_PIXELFORMAT_INDEX1MSB)
CASE(SDL_PIXELFORMAT_INDEX4LSB)
CASE(SDL_PIXELFORMAT_INDEX4MSB)
CASE(SDL_PIXELFORMAT_INDEX8)
CASE(SDL_PIXELFORMAT_RGB332)
CASE(SDL_... | 0 | [
"CWE-703",
"CWE-787"
] | SDL | 8c91cf7dba5193f5ce12d06db1336515851c9ee9 | 155,557,808,285,672,360,000,000,000,000,000,000,000 | 47 | Always create a full 256-entry map in case color values are out of range
Fixes https://github.com/libsdl-org/SDL/issues/5042 |
nfsd_open(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type,
int may_flags, struct file **filp)
{
__be32 err;
validate_process_creds();
/*
* If we get here, then the client has already done an "open",
* and (hopefully) checked permission - so allow OWNER_OVERRIDE
* in case a chmod has now revoked per... | 0 | [
"CWE-732"
] | linux | 22cf8419f1319ff87ec759d0ebdff4cbafaee832 | 138,280,452,719,136,650,000,000,000,000,000,000,000 | 25 | nfsd: apply umask on fs without ACL support
The server is failing to apply the umask when creating new objects on
filesystems without ACL support.
To reproduce this, you need to use NFSv4.2 and a client and server
recent enough to support umask, and you need to export a filesystem that
lacks ACL support (for example,... |
static void addr_hash_set(u32 *mask, const u8 *addr)
{
int n = ether_crc(ETH_ALEN, addr) >> 26;
mask[n >> 5] |= (1 << (n & 31));
} | 0 | [
"CWE-119"
] | linux-2.6 | 3c8a9c63d5fd738c261bd0ceece04d9c8357ca13 | 1,515,576,106,689,368,800,000,000,000,000,000,000 | 5 | tun/tap: Fix crashes if open() /dev/net/tun and then poll() it.
Fix NULL pointer dereference in tun_chr_pool() introduced by commit
33dccbb050bbe35b88ca8cf1228dcf3e4d4b3554 ("tun: Limit amount of queued
packets per device") and triggered by this code:
int fd;
struct pollfd pfd;
fd = open("/dev/net/tun", O_RDWR);
... |
mrb_undef_method(mrb_state *mrb, struct RClass *c, const char *name)
{
undef_method(mrb, c, mrb_intern_cstr(mrb, name));
} | 0 | [
"CWE-476",
"CWE-415"
] | mruby | faa4eaf6803bd11669bc324b4c34e7162286bfa3 | 332,876,904,142,543,260,000,000,000,000,000,000,000 | 4 | `mrb_class_real()` did not work for `BasicObject`; fix #4037 |
void TRI_InitV8ServerUtils(v8::Isolate* isolate) {
TRI_AddGlobalFunctionVocbase(isolate,
TRI_V8_ASCII_STRING(isolate, "SYS_CLUSTER_API_JWT_POLICY"), JS_ClusterApiJwtPolicy, true);
TRI_AddGlobalFunctionVocbase(isolate,
TRI_V8_ASCII_STRING(isolate, "SYS_IS... | 1 | [
"CWE-918"
] | arangodb | d9b7f019d2435f107b19a59190bf9cc27d5f34dd | 322,582,954,351,856,500,000,000,000,000,000,000,000 | 57 | [APM-78] Disable installation from remote URL (#15292) |
static MagickBooleanType DitherImage(Image *image,CubeInfo *cube_info)
{
CacheView
*image_view;
MagickBooleanType
status;
register ssize_t
i;
size_t
depth;
if (cube_info->quantize_info->dither_method != RiemersmaDitherMethod)
return(FloydSteinbergDither(image,cube_info));
/*
Dist... | 0 | [
"CWE-125"
] | ImageMagick6 | e2a21735e3a3f3930bd431585ec36334c4c2eb77 | 261,288,999,565,739,900,000,000,000,000,000,000,000 | 37 | https://github.com/ImageMagick/ImageMagick/issues/1540 |
ddxUseMsg(void)
{
ErrorF("\n");
ErrorF("\n");
ErrorF("Device Dependent Usage\n");
if (!PrivsElevated()) {
ErrorF("-modulepath paths specify the module search path\n");
ErrorF("-logfile file specify a log file name\n");
ErrorF("-configure probe for device... | 0 | [
"CWE-863"
] | xserver | 8a59e3b7dbb30532a7c3769c555e00d7c4301170 | 53,239,518,929,477,570,000,000,000,000,000,000,000 | 63 | Disable -logfile and -modulepath when running with elevated privileges
Could cause privilege elevation and/or arbitrary files overwrite, when
the X server is running with elevated privileges (ie when Xorg is
installed with the setuid bit set and started by a non-root user).
CVE-2018-14665
Issue reported by Narendra ... |
SYMBOL BinSrchKey(const char *id)
{
int l = 1;
int r = NUMKEYS;
int x, res;
while (r >= l)
{
x = (l+r)/2;
res = cmsstrcasecmp(id, TabKeys[x-1].id);
if (res == 0) return TabKeys[x-1].sy;
if (res < 0) r = x - 1;
else l = x + 1;
}
return SNONE;
} | 0 | [] | Little-CMS | 65e2f1df3495edc984f7e0d7b7b24e29d851e240 | 285,488,864,640,126,360,000,000,000,000,000,000,000 | 17 | Fix some warnings from static analysis |
static int user_config_paths(char*** ret) {
_cleanup_strv_free_ char **config_dirs = NULL, **data_dirs = NULL;
_cleanup_free_ char *persistent_config = NULL, *runtime_config = NULL, *data_home = NULL;
_cleanup_strv_free_ char **res = NULL;
int r;
r = xdg_user_dirs(&config_dirs, ... | 0 | [
"CWE-59"
] | systemd | 5579f85663d10269e7ac7464be6548c99cea4ada | 45,498,088,589,961,840,000,000,000,000,000,000,000 | 50 | tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on
Let's add some extra safety.
Fixes: #7736 |
bpf_jit_find_kfunc_model(const struct bpf_prog *prog,
const struct bpf_insn *insn)
{
const struct bpf_kfunc_desc desc = {
.imm = insn->imm,
};
const struct bpf_kfunc_desc *res;
struct bpf_kfunc_desc_tab *tab;
tab = prog->aux->kfunc_tab;
res = bsearch(&desc, tab->descs, tab->nr_descs,
sizeof(tab->de... | 0 | [
"CWE-125"
] | bpf | 049c4e13714ecbca567b4d5f6d563f05d431c80e | 166,729,510,322,454,220,000,000,000,000,000,000,000 | 15 | bpf: Fix alu32 const subreg bound tracking on bitwise operations
Fix a bug in the verifier's scalar32_min_max_*() functions which leads to
incorrect tracking of 32 bit bounds for the simulation of and/or/xor bitops.
When both the src & dst subreg is a known constant, then the assumption is
that scalar_min_max_*() will... |
reply_check_cname_chain(struct query_info* qinfo, struct reply_info* rep)
{
/* check only answer section rrs for matching cname chain.
* the cache may return changed rdata, but owner names are untouched.*/
size_t i;
uint8_t* sname = qinfo->qname;
size_t snamelen = qinfo->qname_len;
for(i=0; i<rep->an_numrrsets;... | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 164,934,131,526,006,800,000,000,000,000,000,000,000 | 23 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
static void fetch_result_int32(MYSQL_BIND *param,
MYSQL_FIELD *field __attribute__((unused)),
uchar **row)
{
my_bool field_is_unsigned= test(field->flags & UNSIGNED_FLAG);
uint32 data= (uint32) sint4korr(*row);
longstore(param->buffer, data);
*param-... | 0 | [] | mysql-server | 3d8134d2c9b74bc8883ffe2ef59c168361223837 | 114,934,219,378,709,060,000,000,000,000,000,000,000 | 10 | Bug#25988681: USE-AFTER-FREE IN MYSQL_STMT_CLOSE()
Description: If mysql_stmt_close() encountered error,
it recorded error in prepared statement
but then frees memory assigned to prepared
statement. If mysql_stmt_error() is used
to get error information, it will resu... |
static int skcipher_setkey_blkcipher(struct crypto_skcipher *tfm,
const u8 *key, unsigned int keylen)
{
struct crypto_blkcipher **ctx = crypto_skcipher_ctx(tfm);
struct crypto_blkcipher *blkcipher = *ctx;
int err;
crypto_blkcipher_clear_flags(blkcipher, ~0);
crypto_blkcipher_set_flags(blkcipher, crypto_s... | 0 | [
"CWE-476",
"CWE-703"
] | linux | 9933e113c2e87a9f46a40fde8dafbf801dca1ab9 | 220,892,817,533,687,560,000,000,000,000,000,000,000 | 16 | crypto: skcipher - Add missing API setkey checks
The API setkey checks for key sizes and alignment went AWOL during the
skcipher conversion. This patch restores them.
Cc: <stable@vger.kernel.org>
Fixes: 4e6c3df4d729 ("crypto: skcipher - Add low-level skcipher...")
Reported-by: Baozeng <sploving1@gmail.com>
Signed-of... |
BOOL security_fips_encrypt(BYTE* data, int length, rdpRdp* rdp)
{
crypto_des3_encrypt(rdp->fips_encrypt, length, data, data);
rdp->encrypt_use_count++;
return TRUE;
} | 0 | [
"CWE-476"
] | FreeRDP | 7d58aac24fe20ffaad7bd9b40c9ddf457c1b06e7 | 162,520,076,603,089,960,000,000,000,000,000,000,000 | 6 | security: add a NULL pointer check to fix a server crash. |
static void sm501_sysbus_class_init(ObjectClass *klass, void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->realize = sm501_realize_sysbus;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
dc->desc = "SM501 Multimedia Companion";
device_class_set_props(dc, sm501_sysbus_properties);
dc->re... | 0 | [
"CWE-190"
] | qemu | b15a22bbcbe6a78dc3d88fe3134985e4cdd87de4 | 162,789,995,377,470,000,000,000,000,000,000,000,000 | 11 | sm501: Replace hand written implementation with pixman where possible
Besides being faster this should also prevent malicious guests to
abuse 2D engine to overwrite data or cause a crash.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: 58666389b6cae256e4e972a32c05cf8aa51bffc0.1590089984.git.balaton@eik... |
void SFClearAutoSave(SplineFont *sf) {
int i;
SplineFont *ssf;
if ( sf->cidmaster!=NULL ) sf = sf->cidmaster;
sf->changed_since_autosave = false;
for ( i=0; i<sf->subfontcnt; ++i ) {
ssf = sf->subfonts[i];
ssf->changed_since_autosave = false;
if ( ssf->autosavename!=NULL ) {
unlink( ssf->au... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 10,945,597,029,528,216,000,000,000,000,000,000,000 | 21 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
static void *virtio_scsi_load_request(QEMUFile *f, SCSIRequest *sreq)
{
SCSIBus *bus = sreq->bus;
VirtIOSCSI *s = container_of(bus, VirtIOSCSI, bus);
VirtIOSCSICommon *vs = VIRTIO_SCSI_COMMON(s);
VirtIOSCSIReq *req;
uint32_t n;
req = g_malloc(sizeof(*req));
qemu_get_be32s(f, &n);
assert... | 1 | [
"CWE-119"
] | qemu | 3c3ce981423e0d6c18af82ee62f1850c2cda5976 | 65,100,945,686,967,670,000,000,000,000,000,000,000 | 24 | virtio-scsi: fix buffer overrun on invalid state load
CVE-2013-4542
hw/scsi/scsi-bus.c invokes load_request.
virtio_scsi_load_request does:
qemu_get_buffer(f, (unsigned char *)&req->elem, sizeof(req->elem));
this probably can make elem invalid, for example,
make in_num or out_num huge, then:
virtio_scsi_p... |
static void store_pending_adv_report(struct hci_dev *hdev, bdaddr_t *bdaddr,
u8 bdaddr_type, s8 rssi, u32 flags,
u8 *data, u8 len)
{
struct discovery_state *d = &hdev->discovery;
bacpy(&d->last_adv_addr, bdaddr);
d->last_adv_addr_type = bdaddr_type;
d->last_adv_rssi = rssi;
d->last_adv_flags = f... | 1 | [] | bluetooth-next | a2ec905d1e160a33b2e210e45ad30445ef26ce0e | 194,715,864,102,819,860,000,000,000,000,000,000,000 | 13 | Bluetooth: fix kernel oops in store_pending_adv_report
Fix kernel oops observed when an ext adv data is larger than 31 bytes.
This can be reproduced by setting up an advertiser with advertisement
larger than 31 bytes. The issue is not sensitive to the advertisement
content. In particular, this was reproduced with a... |
lib_get_reltype_name(self)
VALUE self;
{
set_tcltk_version();
switch(tcltk_version.type) {
case TCL_ALPHA_RELEASE:
return rb_str_new2("alpha");
case TCL_BETA_RELEASE:
return rb_str_new2("beta");
case TCL_FINAL_RELEASE:
return rb_str_new2("final");
default:
rb_raise(r... | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 178,579,570,638,435,900,000,000,000,000,000,000,000 | 18 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static inline void RelinquishPixelCachePixels(CacheInfo *cache_info)
{
switch (cache_info->type)
{
case MemoryCache:
{
#if defined(MAGICKCORE_OPENCL_SUPPORT)
if (cache_info->opencl != (MagickCLCacheInfo) NULL)
{
cache_info->opencl=RelinquishMagickCLCacheInfo(cache_info->opencl,
... | 0 | [
"CWE-476"
] | ImageMagick | 76f94fa2d9ae5d96e15929b6b6ce0c866fc44c69 | 23,223,744,922,462,440,000,000,000,000,000,000,000 | 56 | https://github.com/ImageMagick/ImageMagick/issues/746
https://github.com/ImageMagick/ImageMagick/issues/741 |
EXPORTED int dav_parse_req_target(struct transaction_t *txn,
struct meth_params *params)
{
const char *resultstr = NULL;
int r;
r = params->parse_path(txn->req_uri->path, &txn->req_tgt, &resultstr);
if (r) {
if (r == HTTP_MOVED) txn->location = resultstr;
... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 287,420,813,942,288,770,000,000,000,000,000,000,000 | 14 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
dissect_kafka_renew_delegation_token_response(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
offset = dissect_kafka_error(tvb, pinfo, tree, offset);
offset = dissect_kafka_timestamp(tree, hf_kafka_token_expiry_t... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 194,000,684,171,414,370,000,000,000,000,000,000,000 | 15 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
SpoolssEnumPrinterDrivers_r(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree,
dcerpc_info *di, guint8 *drep)
{
dcerpc_call_value *dcv = (dcerpc_call_value *)di->call_data;
guint32 level = GPOINTER_TO_UINT(dcv->se_data), num_drivers, i;
int buffer_offset;
BUFFER buffer;
/* Pars... | 0 | [
"CWE-399"
] | wireshark | b4d16b4495b732888e12baf5b8a7e9bf2665e22b | 316,184,609,950,755,200,000,000,000,000,000,000,000 | 63 | SPOOLSS: Try to avoid an infinite loop.
Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make
sure our offset always increments in dissect_spoolss_keybuffer.
Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793
Reviewed-on: https://code.wireshark.org/review/14687
Reviewed-by: Gerald Combs <gerald@wires... |
bool HasDynamicTensorImpl(const TfLiteContext& context,
const TensorIntArray& int_array) {
for (int i : int_array) {
if (i == kTfLiteOptionalTensor) continue;
const TfLiteTensor& tensor = context.tensors[i];
if (tensor.allocation_type == kTfLiteDynamic) {
return true;
}... | 0 | [
"CWE-476"
] | tensorflow | f8378920345f4f4604202d4ab15ef64b2aceaa16 | 322,037,005,785,270,230,000,000,000,000,000,000,000 | 11 | Prevent a null pointer dereference in TFLite.
PiperOrigin-RevId: 370800353
Change-Id: Ic9c9712ce5c6e384c954dcd640a5bd9ff05c9a05 |
DereferenceHandleTransferable(shared_ptr<IsolateHolder> isolate, RemoteHandle<v8::Value> reference) :
isolate{std::move(isolate)}, reference{std::move(reference)} {} | 0 | [
"CWE-913"
] | isolated-vm | 2646e6c1558bac66285daeab54c7d490ed332b15 | 8,210,161,651,024,238,000,000,000,000,000,000,000 | 2 | Don't invoke accessors or proxies via Reference functions |
void nfsd4_shutdown_copy(struct nfs4_client *clp)
{
struct nfsd4_copy *copy;
while ((copy = nfsd4_get_copy(clp)) != NULL)
nfsd4_stop_copy(copy);
} | 0 | [
"CWE-476"
] | linux | 01310bb7c9c98752cc763b36532fab028e0f8f81 | 315,023,510,266,598,560,000,000,000,000,000,000,000 | 7 | nfsd: COPY and CLONE operations require the saved filehandle to be set
Make sure we have a saved filehandle, otherwise we'll oops with a null
pointer dereference in nfs4_preprocess_stateid_op().
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.... |
process_fontcache(STREAM s)
{
RD_HGLYPH bitmap;
uint8 font, nglyphs;
uint16 character, offset, baseline, width, height;
int i, datasize;
uint8 *data;
in_uint8(s, font);
in_uint8(s, nglyphs);
logger(Graphics, Debug, "process_fontcache(), font=%d, n=%d", font, nglyphs);
for (i = 0; i < nglyphs; i++)
{
in_u... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 7,095,481,382,498,970,000,000,000,000,000,000,000 | 28 | 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 ... |
char *ldbRedisProtocolToHuman_MultiBulk(sds *o, char *reply) {
char *p = strchr(reply+1,'\r');
long long mbulklen;
int j = 0;
string2ll(reply+1,p-reply-1,&mbulklen);
p += 2;
if (mbulklen == -1) {
*o = sdscatlen(*o,"NULL",4);
return p;
}
*o = sdscatlen(*o,"[",1);
for ... | 0 | [
"CWE-703",
"CWE-125"
] | redis | 6ac3c0b7abd35f37201ed2d6298ecef4ea1ae1dd | 204,911,968,968,449,470,000,000,000,000,000,000,000 | 19 | Fix protocol parsing on 'ldbReplParseCommand' (CVE-2021-32672)
The protocol parsing on 'ldbReplParseCommand' (LUA debugging)
Assumed protocol correctness. This means that if the following
is given:
*1
$100
test
The parser will try to read additional 94 unallocated bytes after
the client buffer.
This commit fixes this ... |
static int sysctl_check_table(const char *path, struct ctl_table *table)
{
int err = 0;
for (; table->procname; table++) {
if (table->child)
err = sysctl_err(path, table, "Not a file");
if ((table->proc_handler == proc_dostring) ||
(table->proc_handler == proc_dointvec) ||
(table->proc_handler == ... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 320,144,958,670,992,500,000,000,000,000,000,000,000 | 29 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
static unsigned long cpu_avg_load_per_task(int cpu)
{
struct rq *rq = cpu_rq(cpu);
unsigned long total = weighted_cpuload(cpu);
unsigned long n = rq->nr_running;
return n ? total / n : SCHED_LOAD_SCALE;
} | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 150,978,487,161,952,980,000,000,000,000,000,000,000 | 8 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
char *FLTGetIsLikeComparisonCommonExpression(FilterEncodingNode *psFilterNode)
{
const size_t bufferSize = 1024;
char szBuffer[1024];
char szTmp[256];
char *pszValue = NULL;
const char *pszWild = NULL;
const char *pszSingle = NULL;
const char *pszEscape = NULL;
int bCaseInsensitive = 0;
FEPropertyIs... | 1 | [
"CWE-200",
"CWE-119"
] | mapserver | e52a436c0e1c5e9f7ef13428dba83194a800f4df | 134,883,724,867,065,190,000,000,000,000,000,000,000 | 83 | security fix (patch by EvenR) |
static bool nft_supported_family(u8 family)
{
return false
#ifdef CONFIG_NF_TABLES_INET
|| family == NFPROTO_INET
#endif
#ifdef CONFIG_NF_TABLES_IPV4
|| family == NFPROTO_IPV4
#endif
#ifdef CONFIG_NF_TABLES_ARP
|| family == NFPROTO_ARP
#endif
#ifdef CONFIG_NF_TABLES_NETDEV
|| family == NFPROTO_NETDEV
#endif
#i... | 0 | [] | net | 520778042ccca019f3ffa136dd0ca565c486cedd | 266,657,346,156,550,620,000,000,000,000,000,000,000 | 23 | netfilter: nf_tables: disallow non-stateful expression in sets earlier
Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression
instantiation"), it is possible to attach stateful expressions to set
elements.
cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate
and destroy phase") in... |
TEST_F(
QuicUnencryptedServerTransportTest,
IncreaseLimitAfterReceivingNewPacket) {
auto qLogger = std::make_shared<FileQLogger>(VantagePoint::Server);
server->getNonConstConn().qLogger = qLogger;
getFakeHandshakeLayer()->allowZeroRttKeys();
server->getNonConstConn().transportSettings.zeroRttSourceToken... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 327,318,687,616,706,850,000,000,000,000,000,000,000 | 37 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
get_quote_count(const char *line)
{
int quote_count;
const char *ptr= line;
for(quote_count= 0; ptr ++ && *ptr; ptr= strpbrk(ptr, "\"\'`"))
quote_count ++;
return quote_count;
} | 1 | [] | mysql-server | 20addb05e58fdf822896f490fcaaf2ec5ed4bcb5 | 186,819,162,260,580,520,000,000,000,000,000,000,000 | 10 | Bug# 25998635: Client does not escape the USE statement
When there are quotes in the USE statement, the mysql client does
not correctly escape them.
The USE statement is processed line by line from the client's parser,
and cannot handle multi-line commands as the server.
The fix is to escape the USE parameters whene... |
static struct sock *__x25_find_socket(unsigned int lci, struct x25_neigh *nb)
{
struct sock *s;
sk_for_each(s, &x25_list)
if (x25_sk(s)->lci == lci && x25_sk(s)->neighbour == nb) {
sock_hold(s);
goto found;
}
s = NULL;
found:
return s;
} | 0 | [] | net | 7781607938c8371d4c2b243527430241c62e39c2 | 67,079,427,656,035,140,000,000,000,000,000,000,000 | 13 | net/x25: Fix null-ptr-deref caused by x25_disconnect
When the link layer is terminating, x25->neighbour will be set to NULL
in x25_disconnect(). As a result, it could cause null-ptr-deref bugs in
x25_sendmsg(),x25_recvmsg() and x25_connect(). One of the bugs is
shown below.
(Thread 1) | (Thread 2... |
SYSCALL_DEFINE1(sparc64_personality, unsigned long, personality)
{
long ret;
if (personality(current->personality) == PER_LINUX32 &&
personality(personality) == PER_LINUX)
personality |= PER_LINUX32;
ret = sys_personality(personality);
if (personality(ret) == PER_LINUX32)
ret &= ~PER_LINUX32;
return ret... | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 85,438,931,273,836,270,000,000,000,000,000,000,000 | 13 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
find_cu_tu_set_v2 (dwarf_vma cu_offset, int do_types)
{
struct cu_tu_set *p;
unsigned int nsets;
unsigned int dw_sect;
if (do_types)
{
p = tu_sets;
nsets = tu_count;
dw_sect = DW_SECT_TYPES;
}
else
{
p = cu_sets;
nsets = cu_count;
dw_sect = DW_SECT_INFO;
}
... | 0 | [
"CWE-703"
] | binutils-gdb | 695c6dfe7e85006b98c8b746f3fd5f913c94ebff | 238,399,505,876,599,600,000,000,000,000,000,000,000 | 27 | PR29370, infinite loop in display_debug_abbrev
The PR29370 testcase is a fuzzed object file with multiple
.trace_abbrev sections. Multiple .trace_abbrev or .debug_abbrev
sections are not a violation of the DWARF standard. The DWARF5
standard even gives an example of multiple .debug_abbrev sections
contained in group... |
Error Box_iloc::read_data(const Item& item,
std::shared_ptr<StreamReader> istr,
const std::shared_ptr<Box_idat>& idat,
std::vector<uint8_t>* dest) const
{
//istr.clear();
for (const auto& extent : item.extents) {
if (item.constructio... | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 230,598,058,856,223,020,000,000,000,000,000,000,000 | 92 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
open_pn_file(modebits)
mode_t modebits;
{
char *path;
int fd, err;
if ((path = name_of_pn_file()) == NULL)
return (-1);
fd = open(path, modebits, S_IRUSR | S_IWUSR);
err = errno;
free(path);
errno = err;
return (fd);
} | 0 | [
"CWE-120",
"CWE-787"
] | ppp | 8d7970b8f3db727fe798b65f3377fe6787575426 | 80,910,271,991,060,100,000,000,000,000,000,000 | 14 | pppd: Fix bounds check in EAP code
Given that we have just checked vallen < len, it can never be the case
that vallen >= len + sizeof(rhostname). This fixes the check so we
actually avoid overflowing the rhostname array.
Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Paul Mackerras <paulus... |
void st_select_lex::replace_leaf_table(TABLE_LIST *table, List<TABLE_LIST> &tbl_list)
{
TABLE_LIST *tl;
List_iterator<TABLE_LIST> ti(leaf_tables);
while ((tl= ti++))
{
if (tl == table)
{
ti.replace(tbl_list);
break;
}
}
} | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 331,104,771,849,785,670,000,000,000,000,000,000,000 | 13 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
static int bpf_prog_store_orig_filter(struct bpf_prog *fp,
const struct sock_fprog *fprog)
{
unsigned int fsize = bpf_classic_proglen(fprog);
struct sock_fprog_kern *fkprog;
fp->orig_prog = kmalloc(sizeof(*fkprog), GFP_KERNEL);
if (!fp->orig_prog)
return -ENOMEM;
fkprog = fp->orig_prog;
fkprog->len ... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 305,207,223,041,618,760,000,000,000,000,000,000,000 | 22 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static int handle_ept_misconfig(struct kvm_vcpu *vcpu)
{
u64 sptes[4];
int nr_sptes, i, ret;
gpa_t gpa;
gpa = vmcs_read64(GUEST_PHYSICAL_ADDRESS);
ret = handle_mmio_page_fault_common(vcpu, gpa, true);
if (likely(ret == RET_MMIO_PF_EMULATE))
return x86_emulate_instruction(vcpu, gpa, 0, NULL, 0) ==
E... | 0 | [
"CWE-20"
] | linux | bfd0a56b90005f8c8a004baf407ad90045c2b11e | 245,346,945,336,182,400,000,000,000,000,000,000,000 | 33 | nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of sh... |
void set_task_rq_fair(struct sched_entity *se,
struct cfs_rq *prev, struct cfs_rq *next)
{
u64 p_last_update_time;
u64 n_last_update_time;
if (!sched_feat(ATTACH_AGE_LOAD))
return;
/*
* We are supposed to update the task to "current" time, then its up to
* date and ready to go to new CPU/cfs_rq. But... | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 229,444,512,446,917,050,000,000,000,000,000,000,000 | 43 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
RuntimeState* runtime_state() { return &runtime_state_; } | 0 | [
"CWE-20",
"CWE-119"
] | node | 530af9cb8e700e7596b3ec812bad123c9fa06356 | 286,533,587,178,656,460,000,000,000,000,000,000,000 | 1 | v8: Interrupts must not mask stack overflow.
Backport of https://codereview.chromium.org/339883002 |
static BROTLI_BOOL BROTLI_NOINLINE SafeDecodeDistanceBlockSwitch(
BrotliDecoderState* s) {
return DecodeDistanceBlockSwitchInternal(1, s);
} | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 168,210,977,611,589,530,000,000,000,000,000,000,000 | 4 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
PHP_METHOD(HttpUrl, toString)
{
if (SUCCESS == zend_parse_parameters_none()) {
php_http_url_t *purl;
if ((purl = php_http_url_from_struct(HASH_OF(getThis())))) {
char *str;
size_t len;
php_http_url_to_string(purl, &str, &len, 0);
php_http_url_free(&purl);
RETURN_STRINGL(str, len, 0);
}
}
RETUR... | 0 | [
"CWE-119"
] | ext-http | 3724cd76a28be1d6049b5537232e97ac567ae1f5 | 319,410,882,131,889,540,000,000,000,000,000,000,000 | 16 | fix bug #71719 (Buffer overflow in HTTP url parsing functions)
The parser's offset was not reset when we softfail in scheme
parsing and continue to parse a path.
Thanks to hlt99 at blinkenshell dot org for the report. |
load_persid(UnpicklerObject *self)
{
PyObject *pid, *obj;
Py_ssize_t len;
char *s;
if (self->pers_func) {
if ((len = _Unpickler_Readline(self, &s)) < 0)
return -1;
if (len < 1)
return bad_readline();
pid = PyUnicode_DecodeASCII(s, len - 1, "strict");
... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 177,252,920,221,864,520,000,000,000,000,000,000,000 | 38 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
static int igmp6_mc_seq_show(struct seq_file *seq, void *v)
{
struct ifmcaddr6 *im = (struct ifmcaddr6 *)v;
struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq);
seq_printf(seq,
"%-4d %-15s %pi6 %5d %08X %ld\n",
state->dev->ifindex, state->dev->name,
&im->mca_addr,
im->mca_users, im->mc... | 0 | [
"CWE-703"
] | linux | 2d3916f3189172d5c69d33065c3c21119fe539fc | 339,676,006,760,568,100,000,000,000,000,000,000,000 | 14 | ipv6: fix skb drops in igmp6_event_query() and igmp6_event_report()
While investigating on why a synchronize_net() has been added recently
in ipv6_mc_down(), I found that igmp6_event_query() and igmp6_event_report()
might drop skbs in some cases.
Discussion about removing synchronize_net() from ipv6_mc_down()
will ha... |
get_hsts_database (void)
{
char *home;
if (opt.hsts_file)
return xstrdup (opt.hsts_file);
home = home_dir ();
if (home)
{
char *dir = aprintf ("%s/.wget-hsts", home);
xfree(home);
return dir;
}
return NULL;
} | 0 | [
"CWE-200"
] | wget | a933bdd31eee9c956a3b5cc142f004ef1fa94cb3 | 301,182,163,316,335,260,000,000,000,000,000,000,000 | 17 | Keep fetched URLs in POSIX extended attributes
* configure.ac: Check for xattr availability
* src/Makefile.am: Add xattr.c
* src/ftp.c: Include xattr.h.
(getftp): Set attributes if enabled.
* src/http.c: Include xattr.h.
(gethttp): Add parameter 'original_url',
set attributes if enabled.
(http_loop): Add 'orig... |
char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
{
timelib_sll day_of_week = timelib_day_of_week(y, m, d);
if (day_of_week < 0) {
return "Unknown";
}
return day_short_names[day_of_week]; | 0 | [] | php-src | c377f1a715476934133f3254d1e0d4bf3743e2d2 | 38,036,472,519,437,117,000,000,000,000,000,000,000 | 8 | Fix bug #68942 (Use after free vulnerability in unserialize() with DateTimeZone) |
put_bytes(stream *zs, byte *buf, uint len)
{
uint used;
sputs(zs, buf, len, &used);
/* NB return value */
} | 0 | [] | ghostpdl | 94d8955cb7725eb5f3557ddc02310c76124fdd1a | 5,178,399,073,717,511,300,000,000,000,000,000,000 | 6 | Bug 701818: better handling of error during PS/PDF image
In the xps device, if an error occurred after xps_begin_image() but before
xps_image_end_image(), *if* the Postscript had called 'restore' as part of the
error handling, the image enumerator would have been freed (by the restore)
despite the xps device still hol... |
static void handle_attr_line(struct attr_stack *res,
const char *line,
const char *src,
int lineno,
int macro_ok)
{
struct match_attr *a;
a = parse_attr_line(line, src, lineno, macro_ok);
if (!a)
return;
if (res->alloc <= res->num_matches) {
res->alloc = alloc_nr(res->num_matche... | 0 | [] | git | f66cf96d7c613a8129436a5d76ef7b74ee302436 | 36,908,121,123,449,986,000,000,000,000,000,000,000 | 19 | Fix buffer overflow in prepare_attr_stack
If PATH_MAX on your system is smaller than a path stored in the git repo,
it may cause the buffer overflow in prepare_attr_stack.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
cifs_nt_open(char *full_path, struct inode *inode, struct cifs_sb_info *cifs_sb,
struct cifs_tcon *tcon, unsigned int f_flags, __u32 *oplock,
struct cifs_fid *fid, unsigned int xid)
{
int rc;
int desired_access;
int disposition;
int create_options = CREATE_NOT_DIR;
FILE_ALL_INFO *buf;
struct TCP_Serve... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 5d81de8e8667da7135d3a32a964087c0faf5483f | 218,317,600,029,650,800,000,000,000,000,000,000,000 | 77 | cifs: ensure that uncached writes handle unmapped areas correctly
It's possible for userland to pass down an iovec via writev() that has a
bogus user pointer in it. If that happens and we're doing an uncached
write, then we can end up getting less bytes than we expect from the
call to iov_iter_copy_from_user. This is ... |
static int sas_rediscover_dev(struct domain_device *dev, int phy_id, bool last)
{
struct expander_device *ex = &dev->ex_dev;
struct ex_phy *phy = &ex->ex_phy[phy_id];
enum sas_device_type type = SAS_PHY_UNUSED;
u8 sas_addr[8];
int res;
memset(sas_addr, 0, 8);
res = sas_get_phy_attached_dev(dev, phy_id, sas_addr... | 0 | [
"CWE-399",
"CWE-772"
] | linux | 4a491b1ab11ca0556d2fda1ff1301e862a2d44c4 | 206,711,757,359,795,420,000,000,000,000,000,000,000 | 56 | scsi: libsas: fix memory leak in sas_smp_get_phy_events()
We've got a memory leak with the following producer:
while true;
do cat /sys/class/sas_phy/phy-1:0:12/invalid_dword_count >/dev/null;
done
The buffer req is allocated and not freed after we return. Fix it.
Fixes: 2908d778ab3e ("[SCSI] aic94xx: new driver")
S... |
static void ZRLE_ENCODE (int x, int y, int w, int h,
zrleOutStream* os, void* buf
EXTRA_ARGS
)
{
int ty;
for (ty = y; ty < y+h; ty += rfbZRLETileHeight) {
int tx, th = rfbZRLETileHeight;
if (th > y+h-ty) th = y+h-ty;
for (tx = x; tx < x+w; tx += rfbZRLETileWidth) ... | 1 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 308,872,820,012,677,750,000,000,000,000,000,000,000 | 21 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
updatesignwithkey(dns_zone_t *zone, dns_signing_t *signing,
dns_dbversion_t *version, bool build_nsec3,
dns_ttl_t minimum, dns_diff_t *diff)
{
isc_result_t result;
dns_dbnode_t *node = NULL;
dns_rdataset_t rdataset;
dns_rdata_t rdata = DNS_RDATA_INIT;
unsigned char data[5];
bool seen_done = false;
bool h... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 208,222,572,357,080,700,000,000,000,000,000,000,000 | 103 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
GF_Err dims_box_size(GF_Box *s)
{
u32 pos = 0;
GF_DIMSSampleEntryBox *p = (GF_DIMSSampleEntryBox *)s;
s->size += 8;
gf_isom_check_position(s, (GF_Box *) p->config, &pos);
gf_isom_check_position(s, (GF_Box *) p->scripts, &pos);
return GF_OK;
} | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 57,837,023,832,509,610,000,000,000,000,000,000,000 | 9 | fixed #1768 |
static void jref_idct_put(uint8_t *dest, int line_size, int16_t *block)
{
ff_j_rev_dct (block);
put_pixels_clamped_c(block, dest, line_size);
} | 0 | [
"CWE-703",
"CWE-189"
] | FFmpeg | 454a11a1c9c686c78aa97954306fb63453299760 | 183,564,982,915,871,600,000,000,000,000,000,000,000 | 5 | avcodec/dsputil: fix signedness in sizeof() comparissions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void gdImageHLine(gdImagePtr im, int y, int x1, int x2, int col)
{
if (im->thick > 1) {
int thickhalf = im->thick >> 1;
_gdImageFilledHRectangle(im, x1, y - thickhalf, x2, y + im->thick - thickhalf - 1, col);
} else {
if (x2 < x1) {
int t = x2;
x2 = x1;
x1 = t;
}
for (;x1 <= x2; x1++) {
... | 0 | [
"CWE-119"
] | php-src | 863d37ea66d5c960db08d6f4a2cbd2518f0f80d1 | 60,643,011,402,950,680,000,000,000,000,000,000,000 | 18 | Fix #72696: imagefilltoborder stackoverflow on truecolor images
We must not allow negative color values be passed to
gdImageFillToBorder(), because that can lead to infinite recursion
since the recursion termination condition will not necessarily be met. |
static inline int bap_read(struct airo_info *ai, __le16 *pu16Dst, int bytelen,
int whichbap)
{
return ai->bap_read(ai, pu16Dst, bytelen, whichbap);
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 59,438,905,754,905,930,000,000,000,000,000,000,000 | 5 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
uint32_t handle(JSObject *self) {
MOZ_ASSERT(is_instance(self));
return static_cast<uint32_t>(JS::GetReservedSlot(self, Slots::Handle).toInt32());
} | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 335,168,510,660,297,240,000,000,000,000,000,000,000 | 4 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
if (err == MP_OKAY) {
if ((err = mp_init_multi(v, w, u1, u2, NULL, NULL)) != MP_OKAY) {
err = MEMORY_E;
}
did_init = 1;
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 196,106,320,347,433,870,000,000,000,000,000,000,000 | 6 | 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. |
inline void swap(T1& a1, T1& b1, T2& a2, T2& b2, T3& a3, T3& b3, T4& a4, T4& b4, T5& a5, T5& b5, T6& a6, T6& b6) {
cimg::swap(a1,b1,a2,b2,a3,b3,a4,b4,a5,b5); cimg::swap(a6,b6);
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 313,642,747,945,389,740,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static inline int bcf1_sync_id(bcf1_t *line, kstring_t *str)
{
// single typed string
if ( line->d.id && strcmp(line->d.id, ".") ) {
return bcf_enc_vchar(str, strlen(line->d.id), line->d.id);
} else {
return bcf_enc_size(str, 0, BCF_BT_CHAR);
}
} | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 306,648,706,225,411,900,000,000,000,000,000,000,000 | 9 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
static int fsck_walk_tag(struct tag *tag, void *data, struct fsck_options *options)
{
char *name = get_object_name(options, &tag->object);
if (parse_tag(tag))
return -1;
if (name)
put_object_name(options, tag->tagged, "%s", name);
return options->walk(tag->tagged, OBJ_ANY, data, options);
} | 0 | [
"CWE-20",
"CWE-88",
"CWE-522"
] | git | a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46 | 215,834,843,047,786,240,000,000,000,000,000,000,000 | 10 | fsck: detect submodule urls starting with dash
Urls with leading dashes can cause mischief on older
versions of Git. We should detect them so that they can be
rejected by receive.fsckObjects, preventing modern versions
of git from being a vector by which attacks can spread.
Signed-off-by: Jeff King <peff@peff.net>
Si... |
do_ucmd(exarg_T *eap)
{
char_u *buf;
char_u *p;
char_u *q;
char_u *start;
char_u *end = NULL;
char_u *ksp;
size_t len, totlen;
size_t split_len = 0;
char_u *split_buf = NULL;
ucmd_T *cmd;
#ifdef FEAT_EVAL
sctx_T save_current_sctx = current_sctx;
#endif
if (eap->cmdidx ... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 75,780,406,336,887,780,000,000,000,000,000,000,000 | 126 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
int pn_ssl_domain_set_peer_authentication(pn_ssl_domain_t *domain,
const pn_ssl_verify_mode_t mode,
const char *trusted_CAs)
{
if (!domain) return -1;
switch (mode) {
case PN_SSL_VERIFY_PEER:
case PN_SSL_VERIFY_PEER_NAME:
#i... | 0 | [] | qpid-proton | 4aea0fd8502f5e9af7f22fd60645eeec07bce0b2 | 162,555,671,790,850,800,000,000,000,000,000,000,000 | 73 | PROTON-2014: [c] Ensure SSL mutual authentication
(cherry picked from commit 97c7733f07712665f3d08091c82c393e4c3adbf7) |
ftp_retrieve_list (struct url *u, struct url *original_url,
struct fileinfo *f, ccon *con)
{
static int depth = 0;
uerr_t err;
struct fileinfo *orig;
wgint local_size;
time_t tml;
bool dlthis; /* Download this (file). */
const char *actual_target = NULL;
bool force_full_retrieve = fal... | 0 | [
"CWE-200"
] | wget | a933bdd31eee9c956a3b5cc142f004ef1fa94cb3 | 153,708,238,978,428,150,000,000,000,000,000,000,000 | 251 | Keep fetched URLs in POSIX extended attributes
* configure.ac: Check for xattr availability
* src/Makefile.am: Add xattr.c
* src/ftp.c: Include xattr.h.
(getftp): Set attributes if enabled.
* src/http.c: Include xattr.h.
(gethttp): Add parameter 'original_url',
set attributes if enabled.
(http_loop): Add 'orig... |
void apply_sao(de265_image* img, int xCtb,int yCtb,
const slice_segment_header* shdr, int cIdx, int nSW,int nSH,
const pixel_t* in_img, int in_stride,
/* */ pixel_t* out_img, int out_stride)
{
if (img->high_bit_depth(cIdx)) {
apply_sao_internal<uint16_t>(img,xCtb,yCtb... | 0 | [
"CWE-703"
] | libde265 | 45904e5667c5bf59c67fcdc586dfba110832894c | 81,412,737,915,997,470,000,000,000,000,000,000,000 | 16 | fix reading invalid images where shdr references are NULL in part of the image (#302) |
static int selinux_msg_queue_associate(struct msg_queue *msq, int msqflg)
{
struct ipc_security_struct *isec;
struct common_audit_data ad;
struct selinux_audit_data sad = {0,};
u32 sid = current_sid();
isec = msq->q_perm.security;
COMMON_AUDIT_DATA_INIT(&ad, IPC);
ad.selinux_audit_data = &sad;
ad.u.ipc_id = m... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 71,138,582,335,317,580,000,000,000,000,000,000,000 | 16 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
static DoubleVal null() {
DoubleVal result;
result.is_null = true;
return result;
} | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 78,121,561,328,825,910,000,000,000,000,000,000,000 | 5 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
static int bond_master_netdev_event(unsigned long event,
struct net_device *bond_dev)
{
struct bonding *event_bond = netdev_priv(bond_dev);
switch (event) {
case NETDEV_CHANGENAME:
return bond_event_changename(event_bond);
default:
break;
}
return NOTIFY_DONE;
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 238,163,390,545,084,700,000,000,000,000,000,000,000 | 14 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
_copyRecursiveUnion(const RecursiveUnion *from)
{
RecursiveUnion *newnode = makeNode(RecursiveUnion);
/*
* copy node superclass fields
*/
CopyPlanFields((const Plan *) from, (Plan *) newnode);
/*
* copy remainder of node
*/
COPY_SCALAR_FIELD(wtParam);
COPY_SCALAR_FIELD(numCols);
if (from->numCols > 0)
... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 251,476,189,685,174,770,000,000,000,000,000,000,000 | 23 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static int php_libxml_unregister_node(xmlNodePtr nodep TSRMLS_DC)
{
php_libxml_node_object *wrapper;
php_libxml_node_ptr *nodeptr = nodep->_private;
if (nodeptr != NULL) {
wrapper = nodeptr->_private;
if (wrapper) {
php_libxml_clear_object(wrapper TSRMLS_CC);
} else {
if (nodeptr->node != NULL && nodep... | 0 | [
"CWE-200"
] | php-src | 8e76d0404b7f664ee6719fd98f0483f0ac4669d6 | 156,440,279,598,559,110,000,000,000,000,000,000,000 | 20 | Fixed external entity loading |
static unsigned next_desc(struct vhost_virtqueue *vq, struct vring_desc *desc)
{
unsigned int next;
/* If this descriptor says it doesn't chain, we're done. */
if (!(desc->flags & cpu_to_vhost16(vq, VRING_DESC_F_NEXT)))
return -1U;
/* Check they're not leading us off end of descriptors. */
next = vhost16_to_cp... | 0 | [
"CWE-120"
] | linux | 060423bfdee3f8bc6e2c1bac97de24d5415e2bc4 | 305,309,341,477,868,070,000,000,000,000,000,000,000 | 12 | vhost: make sure log_num < in_num
The code assumes log_num < in_num everywhere, and that is true as long as
in_num is incremented by descriptor iov count, and log_num by 1. However
this breaks if there's a zero sized descriptor.
As a result, if a malicious guest creates a vring desc with desc.len = 0,
it may cause th... |
int STDCALL
mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg)
{
DBUG_ENTER("mysql_option");
DBUG_PRINT("enter",("option: %d",(int) option));
switch (option) {
case MYSQL_OPT_CONNECT_TIMEOUT:
mysql->options.connect_timeout= *(uint*) arg;
break;
case MYSQL_OPT_READ_TIMEOUT:
mysql... | 1 | [] | mysql-server | bbc2e37fe4e0ca3a7cfa1437a763dc43829e98e2 | 330,389,689,029,883,030,000,000,000,000,000,000,000 | 103 | Bug#27759871: BACKRONYM ISSUE IS STILL IN MYSQL 5.7
Description:- Client applications establishes connection to
server, which does not support SSL, via TCP even when SSL is
enforced via MYSQL_OPT_SSL_MODE or MYSQL_OPT_SSL_ENFORCE or
MYSQL_OPT_SSL_VERIFY_SERVER_CERT.
Analysis:- There exist no error handling for catchi... |
tcp_collapse(struct sock *sk, struct sk_buff_head *list,
struct sk_buff *head, struct sk_buff *tail,
u32 start, u32 end)
{
struct sk_buff *skb, *n;
bool end_of_skbs;
/* First, check that queue is collapsible and find
* the point where collapsing can be useful. */
skb = head;
restart:
end_of_skbs = t... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8b8a321ff72c785ed5e8b4cf6eda20b35d427390 | 301,718,820,230,668,200,000,000,000,000,000,000,000 | 88 | tcp: fix zero cwnd in tcp_cwnd_reduction
Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode
conditionally") introduced a bug that cwnd may become 0 when both
inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
to a div-by-zero if the connection starts another cwnd reduction
phase by set... |
static inline int put_io_context(struct io_context *ioc)
{
return 1;
} | 0 | [
"CWE-20",
"CWE-703",
"CWE-400"
] | linux | b69f2292063d2caf37ca9aec7d63ded203701bf3 | 210,103,057,936,407,720,000,000,000,000,000,000,000 | 4 | block: Fix io_context leak after failure of clone with CLONE_IO
With CLONE_IO, parent's io_context->nr_tasks is incremented, but never
decremented whenever copy_process() fails afterwards, which prevents
exit_io_context() from calling IO schedulers exit functions.
Give a task_struct to exit_io_context(), and call exi... |
irc_server_timer_sasl_cb (void *data, int remaining_calls)
{
struct t_irc_server *server;
/* make C compiler happy */
(void) remaining_calls;
server = (struct t_irc_server *)data;
if (!server)
return WEECHAT_RC_ERROR;
server->hook_timer_sasl = NULL;
if (!serv... | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 235,970,803,520,402,170,000,000,000,000,000,000,000 | 24 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
tartime (struct timespec t, bool full_time)
{
enum { fraclen = sizeof ".FFFFFFFFF" - 1 };
static char buffer[max (UINTMAX_STRSIZE_BOUND + 1,
INT_STRLEN_BOUND (int) + 16)
+ fraclen];
struct tm *tm;
time_t s = t.tv_sec;
int ns = t.tv_nsec;
bool negative = s < 0;
char *p;
if (negative && ns !=... | 0 | [
"CWE-125"
] | tar | d9d4435692150fa8ff68e1b1a473d187cc3fd777 | 233,777,735,768,626,160,000,000,000,000,000,000,000 | 47 | Fix memory leak in read_header
Bug reported in https://savannah.gnu.org/bugs/?59897
* src/list.c (read_header): Don't return directly from the loop.
Instead set the status and break. Return the status. Free
next_long_name and next_long_link before returning. |
Tfloat _cubic_atXY(const float fx, const float fy, const int z=0, const int c=0) const {
const float
nfx = cimg::type<float>::is_nan(fx)?0:cimg::cut(fx,0,width() - 1),
nfy = cimg::type<float>::is_nan(fy)?0:cimg::cut(fy,0,height() - 1);
const int x = (int)nfx, y = (int)nfy;
const fl... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 212,950,567,090,471,600,000,000,000,000,000,000,000 | 24 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
ews_backend_populate (ECollectionBackend *backend)
{
ESource *source;
EEwsBackend *ews_backend = E_EWS_BACKEND (backend);
source = e_backend_get_source (E_BACKEND (backend));
ews_backend->priv->need_update_folders = TRUE;
if (!ews_backend->priv->source_changed_id) {
ews_backend->priv->source_changed_id = g_si... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 317,828,898,919,662,200,000,000,000,000,000,000,000 | 37 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
Perl_safesysmalloc(MEM_SIZE size)
{
#ifdef ALWAYS_NEED_THX
dTHX;
#endif
Malloc_t ptr;
#ifdef USE_MDH
if (size + PERL_MEMORY_DEBUG_HEADER_SIZE < size)
goto out_of_memory;
size += PERL_MEMORY_DEBUG_HEADER_SIZE;
#endif
#ifdef DEBUGGING
if ((SSize_t)size < 0)
Perl_croak_nocontext("panic: mallo... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | perl5 | 34716e2a6ee2af96078d62b065b7785c001194be | 49,284,132,860,750,210,000,000,000,000,000,000,000 | 73 | Perl_my_setenv(); handle integer wrap
RT #133204
Wean this function off int/I32 and onto UV/Size_t.
Also, replace all malloc-ish calls with a wrapper that does
overflow checks,
In particular, it was doing (nlen + vlen + 2) which could wrap when
the combined length of the environment variable name and value
exceeded ... |
static int apply_microcode_early(struct ucode_cpu_info *uci, bool early)
{
struct microcode_intel *mc_intel;
unsigned int val[2];
mc_intel = uci->mc;
if (mc_intel == NULL)
return 0;
/* write microcode via MSR 0x79 */
native_wrmsr(MSR_IA32_UCODE_WRITE,
(unsigned long) mc_intel->bits,
(unsigned lo... | 0 | [
"CWE-119",
"CWE-787"
] | linux | f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4 | 211,750,641,872,813,800,000,000,000,000,000,000,000 | 36 | x86/microcode/intel: Guard against stack overflow in the loader
mc_saved_tmp is a static array allocated on the stack, we need to make
sure mc_saved_count stays within its bounds, otherwise we're overflowing
the stack in _save_mc(). A specially crafted microcode header could lead
to a kernel crash or potentially kerne... |
cdf_file_summary_info(struct magic_set *ms, const cdf_header_t *h,
const cdf_stream_t *sst, const uint64_t clsid[2])
{
cdf_summary_info_header_t si;
cdf_property_info_t *info;
size_t count;
int m;
if (cdf_unpack_summary_info(sst, h, &si, &info, &count) == -1)
... | 1 | [
"CWE-20",
"CWE-119"
] | file | 6d209c1c489457397a5763bca4b28e43aac90391 | 70,803,739,070,601,050,000,000,000,000,000,000,000 | 52 | Apply patches from file-CVE-2012-1571.patch
From Francisco Alonso Espejo:
file < 5.18/git version can be made to crash when checking some
corrupt CDF files (Using an invalid cdf_read_short_sector size)
The problem I found here, is that in most situations (if
h_short_sec_size_p2 > 8) because the blocksiz... |
static int fcn_list_legacy(RzCore *core, RzList *fcns) {
RzListIter *iter;
RzAnalysisFunction *fcn;
rz_list_foreach (fcns, iter, fcn) {
fcn_print_legacy(core, fcn);
}
rz_cons_newline();
return 0;
} | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 2,374,940,912,511,712,000,000,000,000,000,000,000 | 9 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static void fm10k_receive_skb(struct fm10k_q_vector *q_vector,
struct sk_buff *skb)
{
napi_gro_receive(&q_vector->napi, skb);
} | 0 | [
"CWE-476"
] | linux | 01ca667133d019edc9f0a1f70a272447c84ec41f | 332,237,056,622,625,660,000,000,000,000,000,000,000 | 5 | fm10k: Fix a potential NULL pointer dereference
Syzkaller report this:
kasan: GPF could be caused by NULL-ptr deref or user memory access
general protection fault: 0000 [#1] SMP KASAN PTI
CPU: 0 PID: 4378 Comm: syz-executor.0 Tainted: G C 5.0.0+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996),... |
void ZrtpStateClass::timerFailed(int32_t subCode) {
sentPacket = NULL;
nextState(Initial);
parent->zrtpNegotiationFailed(Severe, subCode);
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 74,032,681,947,289,780,000,000,000,000,000,000,000 | 5 | Fix vulnerabilities found and reported by Mark Dowd
- limit length of memcpy
- limit number of offered algorithms in Hello packet
- length check in PING packet
- fix a small coding error |
static int32_t iommu_detach_device(const struct iommu_domain *domain, uint8_t bus, uint8_t devfun)
{
struct dmar_drhd_rt *dmar_unit;
struct dmar_entry *root_table;
uint64_t context_table_addr;
struct dmar_entry *context;
struct dmar_entry *root_entry;
struct dmar_entry *context_entry;
/* source id */
union pci_... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 114,852,550,606,638,330,000,000,000,000,000,000,000 | 53 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
rl_clear_message ()
{
rl_display_prompt = rl_prompt;
if (msg_saved_prompt)
{
rl_restore_prompt ();
msg_saved_prompt = 0;
}
(*rl_redisplay_function) ();
return 0;
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 275,343,627,994,610,930,000,000,000,000,000,000,000 | 11 | bash-4.4-rc2 release |
uint repertoire() const { return MY_STRING_METADATA::repertoire; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 120,270,694,217,732,730,000,000,000,000,000,000,000 | 1 | 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.... |
static int tfilter_notify(struct sk_buff *oskb, struct nlmsghdr *n,
struct tcf_proto *tp, unsigned long fh, int event)
{
struct sk_buff *skb;
u32 pid = oskb ? NETLINK_CB(oskb).pid : 0;
skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
if (!skb)
return -ENOBUFS;
if (tcf_fill_node(skb, tp, fh, pid, n->nlmsg_seq,... | 0 | [
"CWE-200"
] | linux-2.6 | ad61df918c44316940404891d5082c63e79c256a | 141,004,511,222,355,780,000,000,000,000,000,000,000 | 18 | netlink: fix typo in initialization
Commit 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 ("[NETLINK]: Missing
initializations in dumped data") introduced a typo in
initialization. This patch fixes this.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
xmlXPathNodeSetClearFromPos(xmlNodeSetPtr set, int pos, int hasNsNodes)
{
if ((set == NULL) || (set->nodeNr <= 0) || (pos >= set->nodeNr))
return;
else if ((hasNsNodes)) {
int i;
xmlNodePtr node;
for (i = pos; i < set->nodeNr; i++) {
node = set->nodeTab[i];
if ((node != NULL) &&
(node->type == ... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 83,654,521,674,472,630,000,000,000,000,000,000,000 | 17 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
static int nested_svm_intercept_ioio(struct vcpu_svm *svm)
{
unsigned port, size, iopm_len;
u16 val, mask;
u8 start_bit;
u64 gpa;
if (!(svm->nested.intercept & (1ULL << INTERCEPT_IOIO_PROT)))
return NESTED_EXIT_HOST;
port = svm->vmcb->control.exit_info_1 >> 16;
size = (svm->vmcb->control.exit_info_1 & SVM_IO... | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 299,653,931,354,877,640,000,000,000,000,000,000,000 | 24 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
PHP_METHOD(imagickkernel, separate)
{
php_imagickkernel_object *internp;
KernelInfo *kernel_info;
KernelInfo *kernel_info_copy;
int number_values;
KernelValueType * values_copy;
#ifdef ZEND_ENGINE_3
zval separate_object;
#else
zval *separate_object;
#endif
if (zend_parse_parameters_none() == FAILURE) {
retu... | 0 | [
"CWE-787"
] | imagick | 7187b37250b87edb75160c7beda980f2fa308f5d | 100,489,342,385,292,890,000,000,000,000,000,000,000 | 50 | Bounds check kernel origin position. |
static inline int bcf1_sync_filter(bcf1_t *line, kstring_t *str)
{
// typed vector of integers
if ( line->d.n_flt ) {
return bcf_enc_vint(str, line->d.n_flt, line->d.flt, -1);
} else {
return bcf_enc_vint(str, 0, 0, -1);
}
} | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 258,554,228,402,137,320,000,000,000,000,000,000,000 | 9 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.