func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int file_test_run(STANZA *s)
{
static const FILETEST filetests[] = {
{"Sum", file_sum},
{"LShift1", file_lshift1},
{"LShift", file_lshift},
{"RShift", file_rshift},
{"Square", file_square},
{"Product", file_product},
{"Quotient", file_quotient},
... | 0 | [] | openssl | 336923c0c8d705cb8af5216b29a205662db0d590 | 152,766,182,156,462,030,000,000,000,000,000,000,000 | 32 | Fix a carry overflow bug in bn_sqr_comba4/8 for mips 32-bit targets
bn_sqr_comba8 does for instance compute a wrong result for the value:
a=0x4aaac919 62056c84 fba7334e 1a6be678 022181ba fd3aa878 899b2346 ee210f45
The correct result is:
r=0x15c72e32 605a3061 d11b1012 3c187483 6df96999 bd0c22ba d3e7d437 4724a82f
9... |
void vnc_client_write(void *opaque)
{
VncState *vs = opaque;
vnc_lock_output(vs);
if (vs->output.offset || vs->ws_output.offset) {
vnc_client_write_locked(opaque);
} else if (vs->csock != -1) {
qemu_set_fd_handler(vs->csock, vnc_client_read, NULL, vs);
}
vnc_unlock_output(vs);
} | 0 | [] | qemu | 4c65fed8bdf96780735dbdb92a8bd0d6b6526cc3 | 224,802,454,981,691,840,000,000,000,000,000,000,000 | 12 | ui: vnc: avoid floating point exception
While sending 'SetPixelFormat' messages to a VNC server,
the client could set the 'red-max', 'green-max' and 'blue-max'
values to be zero. This leads to a floating point exception in
write_png_palette while doing frame buffer updates.
Reported-by: Lian Yihan <lianyihan@360.cn>
... |
inline void FakeQuant(const tflite::FakeQuantParams& op_params,
const RuntimeShape& input_shape, const float* input_data,
const RuntimeShape& output_shape, float* output_data) {
ruy::profiler::ScopeLabel label("FakeQuant");
float rmin = op_params.minmax.min;
float rmax ... | 0 | [
"CWE-125"
] | tensorflow | 595a65a3e224a0362d7e68c2213acfc2b499a196 | 147,169,230,016,783,160,000,000,000,000,000,000,000 | 23 | Return a TFLite error if gather_nd will result in reading invalid memory
PiperOrigin-RevId: 463054033 |
__nc_putp(SCREEN *sp, const char *name GCC_UNUSED, const char *value)
{
int rc = ERR;
if (value) {
rc = NCURSES_PUTP2(name, value);
}
return rc;
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 330,784,439,798,019,400,000,000,000,000,000,000,000 | 9 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
int streamParseIDOrReply(client *c, robj *o, streamID *id, uint64_t missing_seq) {
char buf[128];
if (sdslen(o->ptr) > sizeof(buf)-1) goto invalid;
memcpy(buf,o->ptr,sdslen(o->ptr)+1);
/* Handle the "-" and "+" special cases. */
if (buf[0] == '-' && buf[1] == '\0') {
id->ms = 0;
id-... | 0 | [
"CWE-125",
"CWE-704"
] | redis | c04082cf138f1f51cedf05ee9ad36fb6763cafc6 | 187,558,865,343,559,380,000,000,000,000,000,000,000 | 32 | Abort in XGROUP if the key is not a stream |
OJPEGReadBytePeek(OJPEGState* sp, uint8* byte)
{
if (sp->in_buffer_togo==0)
{
if (OJPEGReadBufferFill(sp)==0)
return(0);
assert(sp->in_buffer_togo>0);
}
*byte=*(sp->in_buffer_cur);
return(1);
} | 0 | [
"CWE-369"
] | libtiff | 43bc256d8ae44b92d2734a3c5bc73957a4d7c1ec | 301,771,306,788,511,440,000,000,000,000,000,000,000 | 11 | * libtiff/tif_ojpeg.c: make OJPEGDecode() early exit in case of failure in
OJPEGPreDecode(). This will avoid a divide by zero, and potential other issues.
Reported by Agostino Sarubbo.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2611 |
static void ieee80211_xmit_fast_finish(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta, u8 pn_offs,
struct ieee80211_key *key,
struct sk_buff *skb)
{
struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
struct ieee80211_hdr *hdr = (void *)skb->data;
u8 tid = IEEE80211_NU... | 0 | [
"CWE-476"
] | linux | bddc0c411a45d3718ac535a070f349be8eca8d48 | 20,101,223,902,859,594,000,000,000,000,000,000,000 | 58 | mac80211: Fix NULL ptr deref for injected rate info
The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx
queue") moved the code to validate the radiotap header from
ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is
possible to share more code with the new Tx queue selecti... |
BasicWriter &operator<<(unsigned value) {
return *this << IntFormatSpec<unsigned>(value);
} | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 158,349,776,134,256,300,000,000,000,000,000,000,000 | 3 | Fix segfault on complex pointer formatting (#642) |
int skcipher_walk_async(struct skcipher_walk *walk,
struct skcipher_request *req)
{
walk->flags |= SKCIPHER_WALK_PHYS;
INIT_LIST_HEAD(&walk->buffers);
return skcipher_walk_skcipher(walk, req);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | 9933e113c2e87a9f46a40fde8dafbf801dca1ab9 | 174,900,736,254,614,500,000,000,000,000,000,000,000 | 9 | 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... |
static int dns_packet_read_type_windows(DnsPacket *p, Bitmap **types, size_t size, size_t *start) {
_cleanup_(rewind_dns_packet) DnsPacketRewinder rewinder;
int r;
INIT_REWINDER(rewinder, p);
while (p->rindex < rewinder.saved_rindex + size) {
r = dns_packet_read_type_wi... | 0 | [
"CWE-20",
"CWE-476"
] | systemd | a924f43f30f9c4acaf70618dd2a055f8b0f166be | 233,511,507,887,543,300,000,000,000,000,000,000,000 | 25 | resolved: bugfix of null pointer p->question dereferencing (#6020)
See https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1621396 |
show_entry_list (ExifEntry *e, void *data)
{
const ExifParams *p = data;
char v[TAG_VALUE_BUF];
ExifIfd ifd = exif_entry_get_ifd (e);
const char *str;
int fieldwidth, bytes;
size_t width;
if (p->use_ids)
printf("0x%04x", e->tag);
else {
str = C(exif_tag_get_title_in_ifd (e->tag, ifd));
fieldwidth = width... | 0 | [
"CWE-476"
] | exif | f6334d9d32437ef13dc902f0a88a2be0063d9d1c | 9,467,877,725,981,046,000,000,000,000,000,000,000 | 25 | added empty strign check, which would lead to NULL ptr deref/crash in exif XML display. fixes https://github.com/libexif/exif/issues/4 |
int nfs_open(struct inode *inode, struct file *filp)
{
struct nfs_open_context *ctx;
struct rpc_cred *cred;
cred = rpc_lookup_cred();
if (IS_ERR(cred))
return PTR_ERR(cred);
ctx = alloc_nfs_open_context(filp->f_path.mnt, filp->f_path.dentry, cred);
put_rpccred(cred);
if (ctx == NULL)
return -ENOMEM;
ctx->m... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 205,527,320,512,548,700,000,000,000,000,000,000,000 | 17 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
GC_API void GC_CALL GC_enable_incremental(void)
{
# if !defined(GC_DISABLE_INCREMENTAL) && !defined(KEEP_BACK_PTRS)
DCL_LOCK_STATE;
/* If we are keeping back pointers, the GC itself dirties all */
/* pages on which objects have been marked, making */
/* incremental GC pointless. ... | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 72,745,583,671,770,350,000,000,000,000,000,000,000 | 39 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
int xfrm_dev_state_flush(struct net *net, struct net_device *dev, bool task_valid)
{
int i, err = 0, cnt = 0;
spin_lock_bh(&net->xfrm.xfrm_state_lock);
err = xfrm_dev_state_flush_secctx_check(net, dev, task_valid);
if (err)
goto out;
err = -ESRCH;
for (i = 0; i <= net->xfrm.state_hmask; i++) {
struct xfrm_s... | 0 | [
"CWE-416"
] | linux | dbb2483b2a46fbaf833cfb5deb5ed9cace9c7399 | 52,283,322,447,250,930,000,000,000,000,000,000,000 | 40 | xfrm: clean up xfrm protocol checks
In commit 6a53b7593233 ("xfrm: check id proto in validate_tmpl()")
I introduced a check for xfrm protocol, but according to Herbert
IPSEC_PROTO_ANY should only be used as a wildcard for lookup, so
it should be removed from validate_tmpl().
And, IPSEC_PROTO_ANY is expected to only m... |
static int __init etm_perf_init(void)
{
int ret;
etm_pmu.capabilities = PERF_PMU_CAP_EXCLUSIVE;
etm_pmu.attr_groups = etm_pmu_attr_groups;
etm_pmu.task_ctx_nr = perf_sw_context;
etm_pmu.read = etm_event_read;
etm_pmu.event_init = etm_event_init;
etm_pmu.setup_aux = etm_setup_aux;
etm_pmu.free_aux = et... | 0 | [
"CWE-20",
"CWE-476"
] | linux | f09444639099584bc4784dfcd85ada67c6f33e0f | 335,516,109,738,132,800,000,000,000,000,000,000,000 | 26 | coresight: fix kernel panic caused by invalid CPU
Commit d52c9750f150 ("coresight: reset "enable_sink" flag when need be")
caused a kernel panic because of the using of an invalid value: after
'for_each_cpu(cpu, mask)', value of local variable 'cpu' become invalid,
causes following 'cpu_to_node' access invalid memory ... |
COPY_CHAIN(struct evbuffer *dst, struct evbuffer *src)
{
ASSERT_EVBUFFER_LOCKED(dst);
ASSERT_EVBUFFER_LOCKED(src);
dst->first = src->first;
if (src->last_with_datap == &src->first)
dst->last_with_datap = &dst->first;
else
dst->last_with_datap = src->last_with_datap;
dst->last = src->last;
dst->total_len = sr... | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 312,325,897,995,632,600,000,000,000,000,000,000,000 | 12 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
TEST(ExpressionMergeObjects, MergingArrayContainingInvalidTypesShouldThrowException) {
std::vector<Value> first = {Value(Document({{"validType", 1}})), Value("invalidType"_sd)};
ASSERT_THROWS_CODE(evaluateExpression("$mergeObjects", {first}), AssertionException, 40400);
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 296,330,491,969,252,550,000,000,000,000,000,000,000 | 4 | SERVER-38070 fix infinite loop in agg expression |
nfs4_proc_lookup_mountpoint(struct inode *dir, struct dentry *dentry,
struct nfs_fh *fhandle, struct nfs_fattr *fattr)
{
struct rpc_clnt *client = NFS_CLIENT(dir);
int status;
status = nfs4_proc_lookup_common(&client, dir, dentry, fhandle, fattr, NULL);
if (status < 0)
return ERR_PTR(status);
return (cli... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 178,277,339,735,808,440,000,000,000,000,000,000,000 | 11 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req)
{
NvmeNamespace *ns = NULL;
NvmeCmd *cmd = &req->cmd;
uint32_t dw10 = le32_to_cpu(cmd->cdw10);
uint32_t dw11 = le32_to_cpu(cmd->cdw11);
uint32_t nsid = le32_to_cpu(cmd->nsid);
uint8_t fid = NVME_GETSETFEAT_FID(dw10);
uint8_t sa... | 0 | [] | qemu | 736b01642d85be832385063f278fe7cd4ffb5221 | 101,776,138,433,578,930,000,000,000,000,000,000,000 | 142 | hw/nvme: fix CVE-2021-3929
This fixes CVE-2021-3929 "locally" by denying DMA to the iomem of the
device itself. This still allows DMA to MMIO regions of other devices
(e.g. doing P2P DMA to the controller memory buffer of another NVMe
device).
Fixes: CVE-2021-3929
Reported-by: Qiuhao Li <Qiuhao.Li@outlook.com>
Review... |
rdpdr_process(STREAM s)
{
uint32 handle;
uint16 vmin;
uint16 component;
uint16 pakid;
struct stream packet = *s;
logger(Protocol, Debug, "rdpdr_process()");
/* hexdump(s->p, s->end - s->p); */
in_uint16(s, component);
in_uint16(s, pakid);
if (component == RDPDR_CTYP_CORE)
{
switch (pakid)
{
case PA... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 297,126,134,592,117,000,000,000,000,000,000,000,000 | 102 | 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 ... |
void CWebServer::RType_Mobiles(WebEmSession & session, const request& req, Json::Value &root)
{
bool bHaveUser = (session.username != "");
int urights = 3;
if (bHaveUser)
{
int iUser = FindUser(session.username.c_str());
if (iUser != -1)
urights = static_cast<int>(m_users[iUser].userrights)... | 0 | [
"CWE-89"
] | domoticz | ee70db46f81afa582c96b887b73bcd2a86feda00 | 38,947,046,783,987,453,000,000,000,000,000,000,000 | 35 | Fixed possible SQL Injection Vulnerability (Thanks to Fabio Carretto!) |
static inline int vmsvga_fill_rect(struct vmsvga_state_s *s,
uint32_t c, int x, int y, int w, int h)
{
DisplaySurface *surface = qemu_console_surface(s->vga.con);
int bypl = surface_stride(surface);
int width = surface_bytes_per_pixel(surface) * w;
int line = h;
int column;
uint8... | 0 | [] | qemu | fa892e9abb728e76afcf27323ab29c57fb0fe7aa | 4,909,596,931,041,223,500,000,000,000,000,000,000 | 43 | ui/cursor: fix integer overflow in cursor_alloc (CVE-2021-4206)
Prevent potential integer overflow by limiting 'width' and 'height' to
512x512. Also change 'datasize' type to size_t. Refer to security
advisory https://starlabs.sg/advisories/22-4206/ for more information.
Fixes: CVE-2021-4206
Signed-off-by: Mauro Matt... |
int64 static GetBlockValue(int nHeight, int64 nFees)
{
int64 nSubsidy = 50 * COIN;
// Subsidy is cut in half every 4 years
nSubsidy >>= (nHeight / 210000);
return nSubsidy + nFees;
} | 0 | [
"CWE-16",
"CWE-787"
] | bitcoin | a206b0ea12eb4606b93323268fc81a4f1f952531 | 50,291,707,037,980,330,000,000,000,000,000,000,000 | 9 | Do not allow overwriting unspent transactions (BIP 30)
Introduce the following network rule:
* a block is not valid if it contains a transaction whose hash
already exists in the block chain, unless all that transaction's
outputs were already spent before said block.
Warning: this is effectively a network rule ... |
MaybeLocal<Object> X509Certificate::GetPeerCert(
Environment* env,
const SSLPointer& ssl,
GetPeerCertificateFlag flag) {
ClearErrorOnReturn clear_error_on_return;
Local<Object> obj;
MaybeLocal<Object> maybe_cert;
bool is_server =
static_cast<int>(flag) & static_cast<int>(GetPeerCertificateFla... | 0 | [
"CWE-295"
] | node | 466e5415a2b7b3574ab5403acb87e89a94a980d1 | 244,810,638,495,424,550,000,000,000,000,000,000,000 | 27 | crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even ... |
static inline int nla_put_u32(struct sk_buff *skb, int attrtype, u32 value)
{
return nla_put(skb, attrtype, sizeof(u32), &value);
} | 0 | [] | linux-2.6 | 1045b03e07d85f3545118510a587035536030c1c | 102,692,243,672,749,470,000,000,000,000,000,000,000 | 4 | netlink: fix overrun in attribute iteration
kmemcheck reported this:
kmemcheck: Caught 16-bit read from uninitialized memory (f6c1ba30)
0500110001508abf050010000500000002017300140000006f72672e66726565
i i i i i i i i i i i i i u u u u u u u u u u u u u u u u u u u
^
Pid: 3... |
DNSRequest* DNS::AddQuery(DNSHeader *header, int &id, const char* original)
{
/* Is the DNS connection down? */
if (this->GetFd() == -1)
return NULL;
/* Create an id */
do {
id = ServerInstance->GenRandomInt(DNS::MAX_REQUEST_ID);
} while (requests[id]);
DNSRequest* req = new DNSRequest(this, id, original);
... | 0 | [] | inspircd | 58c893e834ff20495d007709220881a3ff13f423 | 29,990,672,723,272,935,000,000,000,000,000,000,000 | 30 | Fixed infinite loop cauesd by invalid dns packets |
lou_getTypeformForEmphClass(const char *tableList, const char *emphClass) {
int i;
TranslationTableHeader *table = lou_getTable(tableList);
if (!table) return 0;
for (i = 0; table->emphClasses[i]; i++)
if (strcmp(emphClass, table->emphClasses[i]) == 0) return italic << i;
return 0;
} | 0 | [
"CWE-787"
] | liblouis | fb2bfce4ed49ac4656a8f7e5b5526e4838da1dde | 307,026,698,786,139,980,000,000,000,000,000,000,000 | 8 | Fix yet another buffer overflow in the braille table parser
Reported by Henri Salo
Fixes #592 |
ZEND_API void zend_objects_store_call_destructors(zend_objects_store *objects TSRMLS_DC)
{
zend_uint i = 1;
for (i = 1; i < objects->top ; i++) {
if (objects->object_buckets[i].valid) {
struct _store_object *obj = &objects->object_buckets[i].bucket.obj;
if (!objects->object_buckets[i].destructor_called) {
... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 6a7cc8ff85827fa9ac715b3a83c2d9147f33cd43 | 219,563,037,621,513,880,000,000,000,000,000,000,000 | 25 | Fix bug #73052 - Memory Corruption in During Deserialized-object Destruction |
int RGWBulkUploadOp::handle_file(const boost::string_ref path,
const size_t size,
AlignedStreamGetter& body)
{
ldout(s->cct, 20) << "bulk upload: got file=" << path << ", size=" << size
<< dendl;
RGWPutObjDataProcessor *filter =... | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 150,672,859,093,597,530,000,000,000,000,000,000,000 | 170 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
static void vm_lock_mapping(struct mm_struct *mm, struct address_space *mapping)
{
if (!test_bit(AS_MM_ALL_LOCKS, &mapping->flags)) {
/*
* AS_MM_ALL_LOCKS can't change from under us because
* we hold the mm_all_locks_mutex.
*
* Operations on ->flags have to be atomic because
* even if AS_MM_ALL_LOCKS ... | 0 | [
"CWE-362"
] | linux | 246c320a8cfe0b11d81a4af38fa9985ef0cc9a4c | 15,656,949,323,591,134,000,000,000,000,000,000,000 | 17 | mm/mmap.c: close race between munmap() and expand_upwards()/downwards()
VMA with VM_GROWSDOWN or VM_GROWSUP flag set can change their size under
mmap_read_lock(). It can lead to race with __do_munmap():
Thread A Thread B
__do_munmap()
detach_vmas_to_be_unmapped()
mmap_write_downgrade()
expand_downwards()
... |
txSlot* fxCheckTypedArrayInstance(txMachine* the, txSlot* slot)
{
if (slot->kind == XS_REFERENCE_KIND) {
txSlot* instance = slot->value.reference;
if (((slot = instance->next)) && (slot->flag & XS_INTERNAL_FLAG) && (slot->kind == XS_TYPED_ARRAY_KIND))
return instance;
}
mxTypeError("this is no TypedArra... | 0 | [
"CWE-125"
] | moddable | 135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45 | 74,523,763,927,170,360,000,000,000,000,000,000,000 | 10 | XS: #896 |
TEST_P(ProtocolIntegrationTest, EnvoyHandlingDuplicate1xx) { testEnvoyHandling1xx(true); } | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 23,412,296,792,510,165,000,000,000,000,000,000,000 | 1 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static ESS_SIGNING_CERT *ESS_SIGNING_CERT_new_init(X509 *signcert,
STACK_OF(X509) *certs)
{
ESS_CERT_ID *cid;
ESS_SIGNING_CERT *sc = NULL;
int i;
/* Creating the ESS_CERT_ID stack. */
if (!(sc = ESS_SIGNING_CERT_new())) goto err;
if (!sc->cert_ids && !(sc->cert_ids = sk_ESS_CERT_ID_new_null()))
goto... | 0 | [] | openssl | c7235be6e36c4bef84594aa3b2f0561db84b63d8 | 187,826,765,165,830,450,000,000,000,000,000,000,000 | 31 | RFC 3161 compliant time stamp request creation, response generation
and response verification.
Submitted by: Zoltan Glozik <zglozik@opentsa.org>
Reviewed by: Ulf Moeller |
usage (int argc, char *argv[])
{
g_printerr ("pkexec --version |\n"
" --help |\n"
" --disable-internal-agent |\n"
" [--user username] [PROGRAM] [ARGUMENTS...]\n"
"\n"
"See the pkexec manual page for more details.\n"
"\n"
... | 0 | [
"CWE-787"
] | polkit | a2bf5c9c83b6ae46cbd5c779d3055bff81ded683 | 247,995,825,708,532,170,000,000,000,000,000,000,000 | 13 | pkexec: local privilege escalation (CVE-2021-4034) |
__do_block_io_op(struct xen_blkif_ring *ring)
{
union blkif_back_rings *blk_rings = &ring->blk_rings;
struct blkif_request req;
struct pending_req *pending_req;
RING_IDX rc, rp;
int more_to_do = 0;
rc = blk_rings->common.req_cons;
rp = blk_rings->common.sring->req_prod;
rmb(); /* Ensure we see queued requests ... | 0 | [
"CWE-200"
] | linux | 089bc0143f489bd3a4578bdff5f4ca68fb26f341 | 133,514,132,656,768,350,000,000,000,000,000,000,000 | 79 | xen-blkback: don't leak stack data via response ring
Rather than constructing a local structure instance on the stack, fill
the fields directly on the shared ring, just like other backends do.
Build on the fact that all response structure flavors are actually
identical (the old code did make this assumption too).
Thi... |
dissect_kafka_offset_delete_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
proto_item *subti;
proto_tree *subtree;
offset = dissect_kafka_string(tree, hf_kafka_consumer_group, tvb, pinfo, offset, 0, NULL, N... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 144,007,529,008,784,160,000,000,000,000,000,000,000 | 19 | 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... |
set_next_entity(struct cfs_rq *cfs_rq, struct sched_entity *se)
{
/* 'current' is not kept within the tree. */
if (se->on_rq) {
/*
* Any task has to be enqueued before it get to execute on
* a CPU. So account for the time it spent waiting on the
* runqueue.
*/
update_stats_wait_end(cfs_rq, se);
__de... | 0 | [] | linux-2.6 | 6a6029b8cefe0ca7e82f27f3904dbedba3de4e06 | 94,243,946,297,241,940,000,000,000,000,000,000,000 | 28 | 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... |
static void test_frm_bug()
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[2];
MYSQL_RES *result;
MYSQL_ROW row;
FILE *test_file;
char data_dir[FN_REFLEN];
char test_frm[FN_REFLEN];
int rc;
myheader("test_frm_bug");
mysql_autocommit(mysql, TRUE);
rc= mysql_query(mysql, "drop t... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 333,788,839,418,475,400,000,000,000,000,000,000,000 | 83 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
static int __hwahc_set_cluster_id(struct hwahc *hwahc, u8 cluster_id)
{
int result;
struct wusbhc *wusbhc = &hwahc->wusbhc;
struct wahc *wa = &hwahc->wa;
struct device *dev = &wa->usb_iface->dev;
result = usb_control_msg(wa->usb_dev, usb_sndctrlpipe(wa->usb_dev, 0),
WUSB_REQ_SET_CLUSTER_ID,
USB_DIR_OUT | US... | 0 | [
"CWE-400",
"CWE-703"
] | linux | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | 58,499,494,524,796,950,000,000,000,000,000,000,000 | 21 | USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by... |
virDomainGetTime(virDomainPtr dom,
long long *seconds,
unsigned int *nseconds,
unsigned int flags)
{
VIR_DOMAIN_DEBUG(dom, "seconds=%p, nseconds=%p, flags=%x",
seconds, nseconds, flags);
virResetLastError();
virCheckDomainReturn(dom, ... | 1 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 222,800,410,947,220,170,000,000,000,000,000,000,000 | 26 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
static int afiucv_pm_prepare(struct device *dev)
{
#ifdef CONFIG_PM_DEBUG
printk(KERN_WARNING "afiucv_pm_prepare\n");
#endif
return 0;
} | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 182,098,471,810,183,250,000,000,000,000,000,000,000 | 7 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
put_port_name(const char *port_name, struct ds *s)
{
if (port_name_needs_quotes(port_name)) {
json_string_escape(port_name, s);
} else {
ds_put_cstr(s, port_name);
}
} | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 43,420,318,452,539,190,000,000,000,000,000,000,000 | 8 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static int io_files_update_prep(struct io_kiocb *req,
const struct io_uring_sqe *sqe)
{
if (sqe->flags || sqe->ioprio || sqe->rw_flags)
return -EINVAL;
req->files_update.offset = READ_ONCE(sqe->off);
req->files_update.nr_args = READ_ONCE(sqe->len);
if (!req->files_update.nr_args)
return -EINVAL;
req->file... | 0 | [] | linux | ff002b30181d30cdfbca316dadd099c3ca0d739c | 300,983,810,498,903,800,000,000,000,000,000,000,000 | 13 | 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> |
// (Note: Most of this function has been written by Eric Fausett)
CImg<T>& _load_png(std::FILE *const file, const char *const filename, unsigned int *const bits_per_pixel) {
if (!file && !filename)
throw CImgArgumentException(_cimg_instance
"load_png(): Specifie... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 214,093,241,062,387,600,000,000,000,000,000,000,000 | 174 | Fix other issues in 'CImg<T>::load_bmp()'. |
void ecryptfs_write_crypt_stat_flags(char *page_virt,
struct ecryptfs_crypt_stat *crypt_stat,
size_t *written)
{
u32 flags = 0;
int i;
for (i = 0; i < ((sizeof(ecryptfs_flag_map)
/ sizeof(struct ecryptfs_flag_map_elem))); i++)
if (crypt_stat->flags & ecryptfs_flag_map[i].local_flag)
flag... | 0 | [
"CWE-703",
"CWE-189"
] | linux | 942080643bce061c3dd9d5718d3b745dcb39a8bc | 334,904,345,759,266,750,000,000,000,000,000,000,000 | 16 | eCryptfs: Remove buggy and unnecessary write in file name decode routine
Dmitry Chernenkov used KASAN to discover that eCryptfs writes past the
end of the allocated buffer during encrypted filename decoding. This
fix corrects the issue by getting rid of the unnecessary 0 write when
the current bit offset is 2.
Signed... |
lftp_ssl_openssl::~lftp_ssl_openssl()
{
SSL_free(ssl);
ssl=0;
} | 0 | [
"CWE-310"
] | lftp | 6357bed2583171b7515af6bb6585cf56d2117e3f | 91,576,328,333,268,460,000,000,000,000,000,000,000 | 5 | use hostmatch function from latest curl (addresses CVE-2014-0139) |
bool_t xdr_authgssapi_init_arg(
XDR *xdrs,
auth_gssapi_init_arg *init_arg)
{
if (! xdr_u_int32(xdrs, &init_arg->version) ||
! xdr_gss_buf(xdrs, &init_arg->token))
return FALSE;
return TRUE;
} | 0 | [
"CWE-703"
] | krb5 | a197e92349a4aa2141b5dff12e9dd44c2a2166e3 | 287,401,726,573,990,260,000,000,000,000,000,000,000 | 9 | Fix kadm5/gssrpc XDR double free [CVE-2014-9421]
[MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free
partial deserialization results upon failure to deserialize. This
responsibility belongs to the callers, svctcp_getargs() and
svcudp_getargs(); doing it in the unwrap function results in freeing
the result... |
void AOClient::pktIcChat(AreaData* area, int argc, QStringList argv, AOPacket packet)
{
if (is_muted) {
sendServerMessage("You cannot speak while muted.");
return;
}
if (!server->can_send_ic_messages) {
return;
}
AOPacket validated_packet = validateIcPacket(packet);
if ... | 0 | [
"CWE-703",
"CWE-129"
] | akashi | 5566cdfedddef1f219aee33477d9c9690bf2f78b | 44,800,968,964,710,390,000,000,000,000,000,000,000 | 25 | Fix out of bounds crash on evidence |
static void sv_usage(void)
{
BIO_printf(bio_err,"usage: s_server [args ...]\n");
BIO_printf(bio_err,"\n");
BIO_printf(bio_err," -accept arg - port to accept on (default is %d)\n",PORT);
BIO_printf(bio_err," -context arg - set session ID context\n");
BIO_printf(bio_err," -verify arg - turn on peer certificate... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 234,067,980,791,389,940,000,000,000,000,000,000,000 | 108 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
static int _match_jobid(void *listentry, void *key)
{
uint32_t *job0 = (uint32_t *)listentry;
uint32_t *job1 = (uint32_t *)key;
return (*job0 == *job1);
} | 0 | [
"CWE-20"
] | slurm | df545955e4f119974c278bff0c47155257d5afc7 | 174,662,991,393,560,370,000,000,000,000,000,000,000 | 7 | Validate gid and user_name values provided to slurmd up front.
Do not defer until later, and do not potentially miss out on proper
validation of the user_name field which can lead to improper authentication
handling.
CVE-2018-10995. |
static void __attribute__((__noreturn__)) print_version(void)
{
const char *ver = NULL;
const char **features = NULL, **p;
mnt_get_library_version(&ver);
mnt_get_library_features(&features);
printf(_("%s from %s (libmount %s"),
program_invocation_short_name,
PACKAGE_STRING,
ver);
p = features;
while (... | 0 | [
"CWE-200"
] | util-linux | 5ebbc3865d1e53ef42e5f121c41faab23dd59075 | 268,308,184,455,407,960,000,000,000,000,000,000,000 | 20 | mount: sanitize paths from non-root users
$ mount /root/.ssh/../../dev/sda2
mount: only root can mount UUID=17bc65ec-4125-4e7c-8a7d-e2795064c736 on /boot
this is too promiscuous. It seems better to ignore on command line
specified paths which are not resolve-able for non-root users.
Fixed version:
$ mount /root... |
int armpmu_event_set_period(struct perf_event *event)
{
struct arm_pmu *armpmu = to_arm_pmu(event->pmu);
struct hw_perf_event *hwc = &event->hw;
s64 left = local64_read(&hwc->period_left);
s64 period = hwc->sample_period;
int ret = 0;
/* The period may have been changed by PERF_EVENT_IOC_PERIOD */
if (unlikely(... | 0 | [
"CWE-20"
] | linux | c95eb3184ea1a3a2551df57190c81da695e2144b | 318,173,575,864,466,960,000,000,000,000,000,000,000 | 37 | ARM: 7809/1: perf: fix event validation for software group leaders
It is possible to construct an event group with a software event as a
group leader and then subsequently add a hardware event to the group.
This results in the event group being validated by adding all members
of the group to a fake PMU and attempting ... |
static void hci_cc_pin_code_neg_reply(struct hci_dev *hdev, struct sk_buff *skb)
{
struct hci_rp_pin_code_neg_reply *rp = (void *) skb->data;
BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
hci_dev_lock(hdev);
if (hci_dev_test_flag(hdev, HCI_MGMT))
mgmt_pin_code_neg_reply_complete(hdev, &rp->bdaddr,
... | 0 | [
"CWE-290"
] | linux | 3ca44c16b0dcc764b641ee4ac226909f5c421aa3 | 148,244,187,629,634,420,000,000,000,000,000,000,000 | 14 | Bluetooth: Consolidate encryption handling in hci_encrypt_cfm
This makes hci_encrypt_cfm calls hci_connect_cfm in case the connection
state is BT_CONFIG so callers don't have to check the state.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org> |
PackLinuxElf32::generateElfHdr(
OutputFile *fo,
void const *proto,
unsigned const brka
)
{
cprElfHdr2 *const h2 = (cprElfHdr2 *)(void *)&elfout;
cprElfHdr3 *const h3 = (cprElfHdr3 *)(void *)&elfout;
h3->ehdr = ((cprElfHdr3 const *)proto)->ehdr;
h3->phdr[C_BASE] = ((cprElfHdr3 const *... | 0 | [
"CWE-476",
"CWE-415"
] | upx | 90279abdfcd235172eab99651043051188938dcc | 287,753,822,235,459,550,000,000,000,000,000,000,000 | 90 | PackLinuxElf::canUnpack must checkEhdr() for ELF input
https://github.com/upx/upx/issues/485
modified: p_lx_elf.cpp |
int redisFormatSdsCommandArgv(sds *target, int argc, const char **argv,
const size_t *argvlen)
{
sds cmd, aux;
unsigned long long totlen;
int j;
size_t len;
/* Abort on a NULL target */
if (target == NULL)
return -1;
/* Calculate our total size */
... | 0 | [
"CWE-190"
] | hiredis | 76a7b10005c70babee357a7d0f2becf28ec7ed1e | 300,981,750,090,749,800,000,000,000,000,000,000,000 | 47 | Fix for integer/buffer overflow CVE-2021-32765
This fix prevents hiredis from trying to allocate more than `SIZE_MAX`
bytes, which would result in a buffer overrun.
[Full Details](https://github.com/redis/hiredis/security/advisories/GHSA-hfm9-39pp-55p2) |
e_mail_part_set_mime_type (EMailPart *part,
const gchar *mime_type)
{
g_return_if_fail (E_IS_MAIL_PART (part));
if (g_strcmp0 (mime_type, part->priv->mime_type) == 0)
return;
g_free (part->priv->mime_type);
part->priv->mime_type = g_strdup (mime_type);
g_object_notify (G_OBJECT (par... | 0 | [
"CWE-347"
] | evolution | f66cd3e1db301d264563b4222a3574e2e58e2b85 | 194,903,901,846,763,700,000,000,000,000,000,000,000 | 13 | eds-I#3 - [GPG] Mails that are not encrypted look encrypted
Related to https://gitlab.gnome.org/GNOME/evolution-data-server/issues/3 |
void CLASS processCanonCameraInfo(unsigned id, uchar *CameraInfo, unsigned maxlen, unsigned type)
{
ushort iCanonLensID = 0, iCanonMaxFocal = 0, iCanonMinFocal = 0, iCanonLens = 0, iCanonCurFocal = 0,
iCanonFocalType = 0;
if (maxlen < 16)
return; // too short
CameraInfo[0] = 0;
CameraInfo[1] = 0;
... | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 219,904,364,640,480,850,000,000,000,000,000,000,000 | 246 | parse_qt: possible integer overflow |
static void update_scan_period(struct task_struct *p, int new_cpu)
{
int src_nid = cpu_to_node(task_cpu(p));
int dst_nid = cpu_to_node(new_cpu);
if (!static_branch_likely(&sched_numa_balancing))
return;
if (!p->mm || !p->numa_faults || (p->flags & PF_EXITING))
return;
if (src_nid == dst_nid)
return;
/*
... | 0 | [
"CWE-400",
"CWE-703",
"CWE-835"
] | linux | c40f7d74c741a907cfaeb73a7697081881c497d0 | 268,319,732,756,811,900,000,000,000,000,000,000,000 | 32 | sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c
Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the
scheduler under high loads, starting at around the v4.18 time frame,
and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list
manipulation.
Do a (manual) re... |
void SetInput(const std::vector<float>& data) {
QuantizeAndPopulate<uint8_t>(input_, data);
} | 0 | [
"CWE-369"
] | tensorflow | 5f7975d09eac0f10ed8a17dbb6f5964977725adc | 110,523,422,311,775,700,000,000,000,000,000,000,000 | 3 | Prevent another div by 0 in optimized pooling implementations TFLite
PiperOrigin-RevId: 370800091
Change-Id: I2119352f57fb5ca4f2051e0e2d749403304a979b |
static RList *symbols(RBinFile *bf) {
RList *res = r_list_newf ((RListFree)r_bin_symbol_free);
r_return_val_if_fail (res && bf->o && bf->o->bin_obj, res);
RCoreSymCacheElement *element = bf->o->bin_obj;
size_t i;
HtUU *hash = ht_uu_new0 ();
if (!hash) {
return res;
}
bool found = false;
for (i = 0; i < eleme... | 1 | [
"CWE-787"
] | radare2 | 669a404b6d98d5db409a5ebadae4e94b34ef5136 | 251,868,842,890,704,400,000,000,000,000,000,000,000 | 41 | Fix oobread and null deref in symbols file parser ##crash
* Reported by @cnitlrt
* BountyID: af6c3e9e-b7df-4d80-b48f-77fdd17b4038/
* Reproducer: symoob |
char *vnc_display_local_addr(DisplayState *ds)
{
VncDisplay *vs = vnc_display;
return vnc_socket_local_addr("%s:%s", vs->lsock);
} | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 275,198,451,282,085,050,000,000,000,000,000,000,000 | 6 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
static int nop_on_interception(struct vcpu_svm *svm)
{
return 1;
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 243,959,507,031,310,200,000,000,000,000,000,000,000 | 4 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
static DBusMessage *set_discovery_filter(DBusConnection *conn,
DBusMessage *msg, void *user_data)
{
struct btd_adapter *adapter = user_data;
struct discovery_client *client;
struct discovery_filter *discovery_filter;
const char *sender = dbus_message_get_sender(msg);
bool is_discovering;
DBG("sender %s", se... | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 140,132,636,699,344,400,000,000,000,000,000,000,000 | 56 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
reset_scroll_region(NCURSES_SP_DCL0)
/* Set the scroll-region to a known state (the default) */
{
if (change_scroll_region) {
NCURSES_PUTP2("change_scroll_region",
TIPARM_2(change_scroll_region,
0, screen_lines(SP_PARM) - 1));
}
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 42,650,399,950,762,560,000,000,000,000,000,000,000 | 9 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
void ConnectionManagerImpl::ActiveStreamEncoderFilter::continueEncoding() { commonContinue(); } | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 167,677,102,456,584,500,000,000,000,000,000,000,000 | 1 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
unsigned int mnt_get_count(struct mount *mnt)
{
#ifdef CONFIG_SMP
unsigned int count = 0;
int cpu;
for_each_possible_cpu(cpu) {
count += per_cpu_ptr(mnt->mnt_pcp, cpu)->mnt_count;
}
return count;
#else
return mnt->mnt_count;
#endif
} | 0 | [
"CWE-269"
] | user-namespace | a6138db815df5ee542d848318e5dae681590fccd | 164,222,335,563,101,780,000,000,000,000,000,000,000 | 15 | mnt: Only change user settable mount flags in remount
Kenton Varda <kenton@sandstorm.io> discovered that by remounting a
read-only bind mount read-only in a user namespace the
MNT_LOCK_READONLY bit would be cleared, allowing an unprivileged user
to the remount a read-only mount read-write.
Correct this by replacing t... |
double Item_func_match::val_real()
{
DBUG_ASSERT(fixed == 1);
DBUG_ENTER("Item_func_match::val");
if (ft_handler == NULL)
DBUG_RETURN(-1.0);
if (key != NO_SUCH_KEY && table->null_row) /* NULL row from an outer join */
DBUG_RETURN(0.0);
if (join_key)
{
if (table->file->ft_handler)
DBUG_RE... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 95,742,399,169,458,820,000,000,000,000,000,000,000 | 28 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static inline void WriteTGAPixel(Image *image,TGAImageType image_type,
const Quantum *p,const QuantumAny range,const double midpoint)
{
if (image_type == TGAColormap || image_type == TGARLEColormap)
(void) WriteBlobByte(image,(unsigned char) GetPixelIndex(image,p));
else
{
if (image_type == TGAMonoc... | 0 | [
"CWE-415"
] | ImageMagick | 4f68e9661518463fca523c9726bb5d940a2aa6d8 | 25,492,566,400,674,470,000,000,000,000,000,000,000 | 42 | https://bugs.launchpad.net/ubuntu/+source/imagemagick/+bug/1490362 |
static RtreeSearchPoint *rtreeEnqueue(
RtreeCursor *pCur, /* The cursor */
RtreeDValue rScore, /* Score for the new search point */
u8 iLevel /* Level for the new search point */
){
int i, j;
RtreeSearchPoint *pNew;
if( pCur->nPoint>=pCur->nPointAlloc ){
int nNew = pCur->nPointAlloc*2 +... | 0 | [
"CWE-125"
] | sqlite | e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8 | 309,502,904,118,135,230,000,000,000,000,000,000,000 | 30 | Enhance the rtreenode() function of rtree (used for testing) so that it
uses the newer sqlite3_str object for better performance and improved
error reporting.
FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377 |
uchar *default_value_ptr(THD *thd)
{ return do_value_ptr(thd, OPT_DEFAULT, 0); } | 0 | [
"CWE-416"
] | server | c05fd700970ad45735caed3a6f9930d4ce19a3bd | 147,616,522,485,268,110,000,000,000,000,000,000,000 | 2 | MDEV-26323 use-after-poison issue of MariaDB server |
static inline int security_msg_queue_msgsnd(struct msg_queue *msq,
struct msg_msg *msg, int msqflg)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 270,992,584,527,950,040,000,000,000,000,000,000,000 | 5 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
uint Field_num::is_equal(Create_field *new_field)
{
return ((new_field->sql_type == real_type()) &&
((new_field->flags & UNSIGNED_FLAG) ==
(uint) (flags & UNSIGNED_FLAG)) &&
((new_field->flags & AUTO_INCREMENT_FLAG) ==
(uint) (flags & AUTO_INCREMENT_FLAG)) &&
(new_field->pack_le... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 310,886,994,954,032,760,000,000,000,000,000,000,000 | 9 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
void Http2Session::MaybeScheduleWrite() {
CHECK(!is_write_scheduled());
if (UNLIKELY(!session_))
return;
if (nghttp2_session_want_write(session_.get())) {
HandleScope handle_scope(env()->isolate());
Debug(this, "scheduling write");
set_write_scheduled();
BaseObjectPtr<Http2Session> strong_ref... | 0 | [
"CWE-416"
] | node | a3c33d4ce78f74d1cf1765704af5b427aa3840a6 | 142,027,177,187,109,300,000,000,000,000,000,000,000 | 26 | http2: update handling of rst_stream with error code NGHTTP2_CANCEL
The PR updates the handling of rst_stream frames and adds all streams
to the pending list on receiving rst frames with the error code
NGHTTP2_CANCEL.
The changes will remove dependency on the stream state that may allow
bypassing the checks in certai... |
unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh)
{
return lh->down_load;
} | 0 | [
"CWE-404"
] | openssl | 64c85430f95200b6b51fe9475bd5203f7c19daf1 | 60,857,138,850,975,670,000,000,000,000,000,000,000 | 4 | Fix bug in OPENSSL_LH_flush
Fixes #18139.
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/18141)
(cherry picked from commit e5da68183410c06f7b350a0721bc2bd6057e438e) |
eval_interp_string(char_u **arg, typval_T *rettv, int evaluate)
{
typval_T tv;
int ret = OK;
int quote;
garray_T ga;
char_u *p;
ga_init2(&ga, 1, 80);
// *arg is on the '$' character, move it to the first string character.
++*arg;
quote = **arg;
++*arg;
for (;;)
{
//... | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 119,635,730,822,136,800,000,000,000,000,000,000,000 | 57 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
static int jpc_dec_process_siz(jpc_dec_t *dec, jpc_ms_t *ms)
{
jpc_siz_t *siz = &ms->parms.siz;
int compno;
int tileno;
jpc_dec_tile_t *tile;
jpc_dec_tcomp_t *tcomp;
int htileno;
int vtileno;
jpc_dec_cmpt_t *cmpt;
dec->xstart = siz->xoff;
dec->ystart = siz->yoff;
dec->xend = siz->width;
dec->yend = siz->he... | 1 | [
"CWE-190"
] | jasper | d91198abd00fc435a397fe6bad906a4c1748e9cf | 286,100,133,453,446,500,000,000,000,000,000,000,000 | 99 | Fixed another integer overflow problem. |
void nested2dotted(BSONObjBuilder& b, const BSONObj& obj, const string& base) {
BSONObjIterator it(obj);
while (it.more()) {
BSONElement e = it.next();
if (e.type() == Object) {
string newbase = base + e.fieldName() + ".";
nested2dotted(b, e.em... | 0 | [
"CWE-20"
] | mongo | f9817a6cf64bdba8e1e1cef30a798110df746b58 | 19,542,583,693,423,054,000,000,000,000,000,000,000 | 14 | SERVER-7769 - turn objcheck on by default and use new fast bson validate |
Header::name() const
{
return typedAttribute <StringAttribute> ("name").value();
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 332,051,295,204,394,940,000,000,000,000,000,000,000 | 4 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static int smack_sem_semop(struct kern_ipc_perm *isp, struct sembuf *sops,
unsigned nsops, int alter)
{
return smk_curacc_sem(isp, MAY_READWRITE);
} | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 239,153,252,387,667,450,000,000,000,000,000,000,000 | 5 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
int detect_shared_rootfs(void)
{
char buf[LXC_LINELEN], *p;
FILE *f;
int i;
char *p2;
f = fopen("/proc/self/mountinfo", "r");
if (!f)
return 0;
while (fgets(buf, LXC_LINELEN, f)) {
for (p = buf, i = 0; p && i < 4; i++)
p = strchr(p + 1, ' ');
if (!p)
continue;
p2 = strchr(p + 1, ' ');
if (!p2)... | 0 | [
"CWE-417"
] | lxc | c1cf54ebf251fdbad1e971679614e81649f1c032 | 50,067,805,405,578,440,000,000,000,000,000,000,000 | 35 | CVE 2018-6556: verify netns fd in lxc-user-nic
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com> |
static int firebird_handle_closer(pdo_dbh_t *dbh) /* {{{ */
{
pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data;
if (dbh->in_txn) {
if (dbh->auto_commit) {
if (isc_commit_transaction(H->isc_status, &H->tr)) {
RECORD_ERROR(dbh);
}
} else {
if (isc_rollback_transaction(H->isc_stat... | 0 | [
"CWE-787"
] | php-src | 08da7c73726f7b86b67d6f0ff87c73c585a7834a | 314,099,237,873,963,540,000,000,000,000,000,000,000 | 34 | Fix #76449: SIGSEGV in firebird_handle_doer
We need to verify that the `result_size` is not larger than our buffer,
and also should make sure that the `len` which is passed to
`isc_vax_integer()` has a permissible value; otherwise we bail out. |
static xmlChar *
xmlXPathParseNameComplex(xmlXPathParserContextPtr ctxt, int qualified) {
xmlChar buf[XML_MAX_NAMELEN + 5];
int len = 0, l;
int c;
/*
* Handler for more complex cases
*/
c = CUR_CHAR(l);
if ((c == ' ') || (c == '>') || (c == '/') || /* accelerators */
(c == '[... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 303,199,307,611,856,450,000,000,000,000,000,000,000 | 70 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
static bool _pam_require_krb5_auth_after_chauthtok(struct pwb_context *ctx,
const char *user)
{
/* Make sure that we only do this if a) the chauthtok got initiated
* during a logon attempt (authenticate->acct_mgmt->chauthtok) b) any
* later password change via the "passwd" command if done by the user
*... | 0 | [
"CWE-20"
] | samba | f62683956a3b182f6a61cc7a2b4ada2e74cde243 | 192,774,928,631,155,960,000,000,000,000,000,000,000 | 38 | fail authentication for single group name which cannot be converted to sid
furthermore if more than one name is supplied and no sid is converted
then also fail.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=8598
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed... |
prepare_viminfo_registers(void)
{
y_read_regs = ALLOC_CLEAR_MULT(yankreg_T, NUM_REGISTERS);
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 277,618,432,784,996,260,000,000,000,000,000,000,000 | 4 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
void ActiveStreamDecoderFilter::onDecoderFilterBelowWriteBufferLowWatermark() {
parent_.filter_manager_callbacks_.onDecoderFilterBelowWriteBufferLowWatermark();
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 130,030,732,134,428,940,000,000,000,000,000,000,000 | 3 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
decodeJsonSignature getDecodeSignature(u8 index) {
return decodeJsonJumpTable[index];
} | 0 | [
"CWE-703",
"CWE-787"
] | open62541 | c800e2987b10bb3af6ef644b515b5d6392f8861d | 255,375,721,550,422,570,000,000,000,000,000,000,000 | 3 | fix(json): Check max recursion depth in more places |
bool checkreturn pb_decode_tag(pb_istream_t *stream, pb_wire_type_t *wire_type, uint32_t *tag, bool *eof)
{
uint32_t temp;
*eof = false;
*wire_type = (pb_wire_type_t) 0;
*tag = 0;
if (!pb_decode_varint32_eof(stream, &temp, eof))
{
return false;
}
*tag = temp >> 3;
*... | 0 | [
"CWE-763"
] | nanopb | e2f0ccf939d9f82931d085acb6df8e9a182a4261 | 328,109,933,764,974,500,000,000,000,000,000,000,000 | 16 | Fix invalid free() with oneof (#647)
Nanopb would call free() or realloc() on an invalid
(attacker controlled) pointer value when all the following
conditions are true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definition contains an oneof field, and the oneof
contains at least one pointer type fi... |
static rfbBool DummyPoint(rfbClient* client, int x, int y) {
return TRUE;
} | 0 | [
"CWE-189"
] | libvncserver | 045a044e8ae79db9244593fbce154cdf6e843273 | 331,038,929,240,364,650,000,000,000,000,000,000,000 | 3 | Fix integer overflow in MallocFrameBuffer()
Promote integers to uint64_t to avoid integer overflow issue during
frame buffer allocation for very large screen sizes |
check_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
GoaHttpClient *client = GOA_HTTP_CLIENT (source_object);
AddAccountData *data = user_data;
goa_http_client_check_finish (client, res, &data->error);
g_main_loop_quit (data->loop);
gtk_widget_set_sensitive (data->connect_button, TRUE);... | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 167,019,095,895,052,740,000,000,000,000,000,000,000 | 10 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
usage (int status)
{
if (status != EXIT_SUCCESS)
fprintf (stderr, _("Try `%s --help' for more information.\n"),
program_name);
else
{
printf (_("\
Usage: %s [OPTION]... [STRINGS]...\n\
"), program_name);
fputs (_("\
Internationalized Domain Name (IDNA2008) convert STRINGS, or standard inpu... | 1 | [
"CWE-20"
] | libidn2 | 241e8f486134793cb0f4a5b0e5817a97883401f5 | 303,337,593,674,247,850,000,000,000,000,000,000,000 | 47 | Perform A-Label roundtrip for lookup functions by default
This adds another check to avoid unexpected results.
It was a longstanding FIXME.
Thanks to Jonathan Birch of Microsoft Corporation,
Florian Weimer (GNU glibc) and Nikos Mavrogiannopoulos (GnuTLS)
for investigation, discussion and testing. |
void
close_new_fifos (list, lsize)
char *list;
int lsize;
{
int i;
if (list == 0)
{
unlink_fifo_list ();
return;
}
for (i = 0; i < lsize; i++)
if (list[i] == 0 && i < fifo_list_size && fifo_list[i].proc != -1)
unlink_fifo (i);
for (i = lsize; i < fifo_list_size; i++)
... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 318,726,981,878,160,930,000,000,000,000,000,000,000 | 19 | Bash-4.4 patch 7 |
loop_info64_from_compat(const struct compat_loop_info __user *arg,
struct loop_info64 *info64)
{
struct compat_loop_info info;
if (copy_from_user(&info, arg, sizeof(info)))
return -EFAULT;
memset(info64, 0, sizeof(*info64));
info64->lo_number = info.lo_number;
info64->lo_device = info.lo_device;
info64->lo... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 | 9,446,224,413,271,709,000,000,000,000,000,000,000 | 27 | loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_release(), which
will continue to use the loop device even after it has decremented the
lo_refcnt to zero.
In the meantime, another process can come in, o... |
GF_Err mhac_box_read(GF_Box *s,GF_BitStream *bs)
{
GF_MHAConfigBox *ptr = (GF_MHAConfigBox *) s;
ISOM_DECREASE_SIZE(s, 5)
ptr->configuration_version = gf_bs_read_u8(bs);
ptr->mha_pl_indication = gf_bs_read_u8(bs);
ptr->reference_channel_layout = gf_bs_read_u8(bs);
ptr->mha_config_size = gf_bs_read_u16(bs);
if (... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 260,607,492,859,017,380,000,000,000,000,000,000,000 | 19 | fixed #2255 |
static int vq2q(int queue_index)
{
return queue_index / 2;
} | 0 | [
"CWE-119"
] | qemu | 98f93ddd84800f207889491e0b5d851386b459cf | 198,977,860,824,013,980,000,000,000,000,000,000,000 | 4 | virtio-net: out-of-bounds buffer write on load
CVE-2013-4149 QEMU 1.3.0 out-of-bounds buffer write in
virtio_net_load()@hw/net/virtio-net.c
> } else if (n->mac_table.in_use) {
> uint8_t *buf = g_malloc0(n->mac_table.in_use);
We are allocating buffer of size n->mac_table.in_use
> qemu... |
bool btd_has_kernel_features(uint32_t features)
{
return (kernel_features & features) ? true : false;
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 92,378,561,905,834,780,000,000,000,000,000,000,000 | 4 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
static int start_endpoints(struct snd_usb_substream *subs, bool can_sleep)
{
int err;
if (!subs->data_endpoint)
return -EINVAL;
if (!test_and_set_bit(SUBSTREAM_FLAG_DATA_EP_STARTED, &subs->flags)) {
struct snd_usb_endpoint *ep = subs->data_endpoint;
dev_dbg(&subs->dev->dev, "Starting data EP @%p\n", ep);
... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 237,056,235,617,669,700,000,000,000,000,000,000,000 | 51 | ALSA: usb-audio: Add sanity checks for endpoint accesses
Add some sanity check codes before actually accessing the endpoint via
get_endpoint() in order to avoid the invalid access through a
malformed USB descriptor. Mostly just checking bNumEndpoints, but in
one place (snd_microii_spdif_default_get()), the validity o... |
box_center(PG_FUNCTION_ARGS)
{
BOX *box = PG_GETARG_BOX_P(0);
Point *result = (Point *) palloc(sizeof(Point));
box_cn(result, box);
PG_RETURN_POINT_P(result);
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 218,255,568,776,652,650,000,000,000,000,000,000,000 | 9 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
static nad_t _sx_sasl_abort(sx_t s) {
nad_t nad;
int ns;
nad = nad_new();
ns = nad_add_namespace(nad, uri_SASL, NULL);
nad_append_elem(nad, ns, "abort", 0);
return nad;
} | 0 | [
"CWE-287",
"CWE-703"
] | jabberd2 | 8416ae54ecefa670534f27a31db71d048b9c7f16 | 161,134,132,131,851,440,000,000,000,000,000,000,000 | 11 | Fixed offered SASL mechanism check |
read_fru_area(struct ipmi_intf * intf, struct fru_info *fru, uint8_t id,
uint32_t offset, uint32_t length, uint8_t *frubuf)
{
uint32_t off = offset, tmp, finish;
struct ipmi_rs * rsp;
struct ipmi_rq req;
uint8_t msg_data[4];
if (offset > fru->size) {
lprintf(LOG_ERR, "Read FRU Area offset incorrect: %d > %d"... | 1 | [
"CWE-120",
"CWE-787"
] | ipmitool | e824c23316ae50beb7f7488f2055ac65e8b341f2 | 309,819,953,627,432,470,000,000,000,000,000,000,000 | 113 | fru: Fix buffer overflow vulnerabilities
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `read_fru_area_section` function only performs size validation of
requested read size, and falsely assumes that the IPMI message will not
respond with more than ... |
set_helplang_default(char_u *lang)
{
int idx;
if (lang == NULL || STRLEN(lang) < 2) // safety check
return;
idx = findoption((char_u *)"hlg");
if (idx >= 0 && !(options[idx].flags & P_WAS_SET))
{
if (options[idx].flags & P_ALLOCED)
free_string_option(p_hlg);
p_hlg = vim_strsave(lang);
if ... | 0 | [
"CWE-122"
] | vim | b7081e135a16091c93f6f5f7525a5c58fb7ca9f9 | 215,416,429,775,072,000,000,000,000,000,000,000,000 | 33 | patch 8.2.3402: invalid memory access when using :retab with large value
Problem: Invalid memory access when using :retab with large value.
Solution: Check the number is positive. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.