func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void handshakeErr(
AsyncSSLSocket*,
const AsyncSocketException& ex) noexcept override {
ADD_FAILURE() << "client handshake error: " << ex.what();
} | 0 | [
"CWE-125"
] | folly | c321eb588909646c15aefde035fd3133ba32cdee | 176,698,307,716,739,140,000,000,000,000,000,000,000 | 5 | Handle close_notify as standard writeErr in AsyncSSLSocket.
Summary: Fixes CVE-2019-11934
Reviewed By: mingtaoy
Differential Revision: D18020613
fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836 |
int imap_get_literal_count(const char *buf, unsigned int *bytes)
{
char *pc = NULL;
char *pn = NULL;
if (!buf || !(pc = strchr(buf, '{')))
return -1;
pc++;
pn = pc;
while (isdigit((unsigned char) *pc))
pc++;
*pc = '\0';
if (mutt_str_atoui(pn, bytes) < 0)
return -1;
return 0;
} | 0 | [
"CWE-78",
"CWE-77"
] | neomutt | e52393740334443ae0206cab2d7caef381646725 | 94,817,956,607,241,500,000,000,000,000,000,000,000 | 18 | quote imap strings more carefully
Co-authored-by: JerikoOne <jeriko.one@gmx.us> |
static int parse_uin32_array(tvbuff_t *tvb, int offset, proto_tree *tree, guint32 count, const char *fmt, ...)
{
guint32 v, i;
proto_item *item;
const char *txt;
va_list ap;
va_start(ap, fmt);
txt = wmem_strdup_vprintf(wmem_packet_scope(), fmt, ap);
va_end(ap);
proto_tree_add_subtree(tree, tvb, offset, count *... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 42,948,714,298,913,300,000,000,000,000,000,000,000 | 24 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
static IntervalTree *InitializeIntervalTree(const ZeroCrossing *zero_crossing,
const size_t number_crossings)
{
IntervalTree
*head,
**list,
*node,
*root;
register ssize_t
i;
ssize_t
j,
k,
left,
number_nodes;
/*
Allocate interval tree.
*/
list=(IntervalTree **) Ac... | 0 | [
"CWE-369"
] | ImageMagick | a4c89f2a61069ad7637bc7749cc1a839de442526 | 277,576,042,332,022,980,000,000,000,000,000,000,000 | 109 | https://github.com/ImageMagick/ImageMagick/issues/1730 |
switch (yych) {
case 'a': goto yy42;
default: goto yy41;
} | 1 | [
"CWE-787"
] | re2c | 039c18949190c5de5397eba504d2c75dad2ea9ca | 33,651,686,716,297,354,000,000,000,000,000,000,000 | 4 | Emit an error when repetition lower bound exceeds upper bound.
Historically this was allowed and re2c swapped the bounds. However, it
most likely indicates an error in user code and there is only a single
occurrence in the tests (and the test in an artificial one), so although
the change is backwards incompatible ther... |
static void parse_sec_attr(sc_file_t *file, const u8 *buf, size_t len)
{
size_t i;
const int *idx;
idx = (file->type == SC_FILE_TYPE_DF) ? df_acl : ef_acl;
/* acl defaults to 0xFF if unspecified */
for (i = 0; i < 9; i++)
if (idx[i] != -1)
add_acl_entry(file, idx[i], (u8)((i < len) ? buf[i] : 0xFF));
} | 0 | [] | OpenSC | 1252aca9f10771ef5ba8405e73cf2da50827958f | 163,767,943,676,078,760,000,000,000,000,000,000,000 | 12 | cardos: Correctly calculate the left bytes to avoid buffer overrun
Thanks oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29912 |
GF_Err moov_on_child_box(GF_Box *s, GF_Box *a, Bool is_rem)
{
GF_MovieBox *ptr = (GF_MovieBox *)s;
switch (a->type) {
case GF_ISOM_BOX_TYPE_IODS:
BOX_FIELD_ASSIGN(iods, GF_ObjectDescriptorBox)
//if no IOD, delete the box
if (ptr->iods && !ptr->iods->descriptor) {
ptr->iods = NULL;
gf_isom_box_del_parent(... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | b8f8b202d4fc23eb0ab4ce71ae96536ca6f5d3f8 | 155,422,147,284,210,400,000,000,000,000,000,000,000 | 45 | fixed #1757 |
void setAuthEnabled(const bool state) override {
invariant(!state);
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 333,781,439,327,036,000,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
int sev_mem_enc_unregister_region(struct kvm *kvm,
struct kvm_enc_region *range)
{
struct enc_region *region;
int ret;
/* If kvm is mirroring encryption context it isn't responsible for it */
if (is_mirroring_enc_context(kvm))
return -EINVAL;
mutex_lock(&kvm->lock);
if (!sev_guest(kvm)) {
ret = -ENOT... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 47,772,741,497,061,750,000,000,000,000,000,000,000 | 39 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
GF_Err fiin_Write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
FDItemInformationBox *ptr = (FDItemInformationBox *) s;
if (!s) return GF_BAD_PARAM;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
gf_bs_write_u16(bs, gf_list_count(ptr->partition_entries) );
e = gf_isom_box_array_write(s, ptr->partition_entries, ... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 182,299,306,176,016,550,000,000,000,000,000,000,000 | 15 | fixed 2 possible heap overflows (inc. #1088) |
void msre_engine_reqbody_processor_register(msre_engine *engine,
const char *name, void *fn_init, void *fn_process, void *fn_complete)
{
msre_reqbody_processor_metadata *metadata =
(msre_reqbody_processor_metadata *)apr_pcalloc(engine->mp,
sizeof(msre_reqbody_processor_metadata));
if (m... | 0 | [
"CWE-476"
] | ModSecurity | 0840b13612a0b7ef1ce7441cf811dcfc6b463fba | 89,332,479,865,619,340,000,000,000,000,000,000,000 | 14 | Fixed: chuck null pointer when unknown CT is sent and over in-memory limit |
Opal::Call::transfer (std::string uri)
{
PSafePtr<OpalConnection> connection = get_remote_connection ();
if (connection != NULL)
connection->TransferConnection (uri);
} | 0 | [] | ekiga | 7d09807257963a4f5168a01aec1795a398746372 | 131,459,663,446,577,720,000,000,000,000,000,000,000 | 6 | Validate UTF-8 strings before showing them
Closes bug #653009. |
static ssize_t send_change_cipher_spec(gnutls_session_t session, int again)
{
uint8_t *data;
mbuffer_st *bufel;
int ret;
const version_entry_st *vers;
if (again == 0) {
bufel = _gnutls_handshake_alloc(session, 1);
if (bufel == NULL)
return gnutls_assert_val(GNUTLS_E_MEMORY_ERROR);
vers = get_version(ses... | 0 | [
"CWE-310"
] | gnutls | db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa | 270,420,471,821,444,840,000,000,000,000,000,000,000 | 46 | handshake: check for TLS_FALLBACK_SCSV
If TLS_FALLBACK_SCSV was sent by the client during the handshake, and
the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX,
send the "Inappropriate fallback" fatal alert and abort the handshake.
This mechanism was defined in RFC7507. |
V9fsPDU *pdu_alloc(V9fsState *s)
{
V9fsPDU *pdu = NULL;
if (!QLIST_EMPTY(&s->free_list)) {
pdu = QLIST_FIRST(&s->free_list);
QLIST_REMOVE(pdu, next);
QLIST_INSERT_HEAD(&s->active_list, pdu, next);
}
return pdu;
} | 0 | [
"CWE-362"
] | qemu | 89fbea8737e8f7b954745a1ffc4238d377055305 | 29,941,127,986,091,980,000,000,000,000,000,000,000 | 11 | 9pfs: Fully restart unreclaim loop (CVE-2021-20181)
Depending on the client activity, the server can be asked to open a huge
number of file descriptors and eventually hit RLIMIT_NOFILE. This is
currently mitigated using a reclaim logic : the server closes the file
descriptors of idle fids, based on the assumption that... |
static int init_pitch_v2(struct snd_usb_audio *chip, int iface,
struct usb_host_interface *alts,
struct audioformat *fmt)
{
struct usb_device *dev = chip->dev;
unsigned char data[1];
int err;
data[0] = 1;
if ((err = snd_usb_ctl_msg(dev, usb_sndctrlpipe(dev, 0), UAC2_CS_CUR,
USB_TYPE_CLASS | USB_REC... | 0 | [] | sound | 447d6275f0c21f6cc97a88b3a0c601436a4cdf2a | 182,043,862,024,558,960,000,000,000,000,000,000,000 | 20 | 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... |
static DWORD get_interface_index(const char *guid)
{
ULONG index;
DWORD status;
wchar_t wbuf[INTERFACE_PATH_BUF_SZ];
snwprintf(wbuf, INTERFACE_PATH_BUF_SZ, L"\\device\\tcpip_%s", guid);
wbuf[INTERFACE_PATH_BUF_SZ - 1] = 0;
status = GetAdapterIndex (wbuf, &index);
if (status != NO_ERROR) {
... | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 55,482,868,722,105,950,000,000,000,000,000,000,000 | 14 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... |
psutil_users(PyObject *self, PyObject *args) {
struct utmp *ut;
PyObject *py_retlist = PyList_New(0);
PyObject *py_tuple = NULL;
PyObject *py_username = NULL;
PyObject *py_tty = NULL;
PyObject *py_hostname = NULL;
PyObject *py_user_proc = NULL;
if (py_retlist == NULL)
return NUL... | 1 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 100,114,393,719,430,980,000,000,000,000,000,000,000 | 58 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
static int nfs4_xdr_dec_fsid_present(struct rpc_rqst *rqstp,
struct xdr_stream *xdr,
void *data)
{
struct nfs4_fsid_present_res *res = data;
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (status)
goto out;
status = decode_sequence(xdr, &res->seq_res, rqstp);... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 178,183,787,088,381,370,000,000,000,000,000,000,000 | 25 | 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... |
obj2ast_type_ignore(PyObject* obj, type_ignore_ty* out, PyArena* arena)
{
int isinstance;
PyObject *tmp = NULL;
if (obj == Py_None) {
*out = NULL;
return 0;
}
isinstance = PyObject_IsInstance(obj, (PyObject*)TypeIgnore_type);
if (isinstance == -1) {
return 1;
}
... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 179,962,983,761,170,660,000,000,000,000,000,000,000 | 40 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
bool LEX::sp_declare_cursor(THD *thd, const LEX_CSTRING *name,
sp_lex_cursor *cursor_stmt,
sp_pcontext *param_ctx, bool add_cpush_instr)
{
uint offp;
sp_instr_cpush *i;
if (spcont->find_cursor(name, &offp, true))
{
my_error(ER_SP_DUP_CURS, MYF(0), nam... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 257,463,171,877,037,520,000,000,000,000,000,000,000 | 25 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
int HeifContext::Image::get_luma_bits_per_pixel() const
{
heif_item_id id;
Error err = m_heif_context->get_id_of_non_virtual_child_image(m_id, id);
if (err) {
return -1;
}
return m_heif_context->m_heif_file->get_luma_bits_per_pixel_from_configuration(id);
} | 0 | [
"CWE-125"
] | libheif | f7399b62d7fbc596f1b2871578c1d2053bedf1dd | 51,187,229,976,420,100,000,000,000,000,000,000,000 | 10 | Handle case where referenced "iref" box doesn't exist (fixes #138). |
static half max() { return (half)65504; } | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 182,709,162,305,200,320,000,000,000,000,000,000,000 | 1 | Fix other issues in 'CImg<T>::load_bmp()'. |
test_policies_general(void *arg)
{
int i;
smartlist_t *policy = NULL, *policy2 = NULL, *policy3 = NULL,
*policy4 = NULL, *policy5 = NULL, *policy6 = NULL,
*policy7 = NULL, *policy8 = NULL, *policy9 = NULL,
*policy10 = NULL, *policy11 = NULL, *policy12 = NULL;
addr_policy_... | 1 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 189,994,350,843,214,930,000,000,000,000,000,000,000 | 962 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
datetime_s_httpdate(int argc, VALUE *argv, VALUE klass)
{
VALUE str, sg;
rb_scan_args(argc, argv, "02", &str, &sg);
switch (argc) {
case 0:
str = rb_str_new2("Mon, 01 Jan -4712 00:00:00 GMT");
case 1:
sg = INT2FIX(DEFAULT_SG);
}
{
VALUE hash = date_s__httpdate(klass, str);
return ... | 1 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 92,646,245,878,608,240,000,000,000,000,000,000,000 | 18 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
void CL_Snd_Restart_f(void)
{
CL_Snd_Shutdown();
// sound will be reinitialized by vid_restart
CL_Vid_Restart_f();
} | 0 | [
"CWE-269"
] | ioq3 | 376267d534476a875d8b9228149c4ee18b74a4fd | 234,144,398,536,375,640,000,000,000,000,000,000,000 | 6 | Don't load .pk3s as .dlls, and don't load user config files from .pk3s. |
xmlSchemaAttrUsesDump(xmlSchemaItemListPtr uses, FILE * output)
{
xmlSchemaAttributeUsePtr use;
xmlSchemaAttributeUseProhibPtr prohib;
xmlSchemaQNameRefPtr ref;
const xmlChar *name, *tns;
xmlChar *str = NULL;
int i;
if ((uses == NULL) || (uses->nbItems == 0))
return;
fprintf(ou... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 41,515,514,655,716,317,000,000,000,000,000,000,000 | 35 | 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 void selinux_bprm_committed_creds(struct linux_binprm *bprm)
{
const struct task_security_struct *tsec = current_security();
struct itimerval itimer;
u32 osid, sid;
int rc, i;
osid = tsec->osid;
sid = tsec->sid;
if (sid == osid)
return;
/* Check whether the new SID can inherit signal state from the ... | 0 | [
"CWE-682"
] | linux-stable | 0c461cb727d146c9ef2d3e86214f498b78b7d125 | 226,174,709,851,213,320,000,000,000,000,000,000,000 | 44 | selinux: fix off-by-one in setprocattr
SELinux tries to support setting/clearing of /proc/pid/attr attributes
from the shell by ignoring terminating newlines and treating an
attribute value that begins with a NUL or newline as an attempt to
clear the attribute. However, the test for clearing attributes has
always bee... |
TEST_P(DownstreamProtocolIntegrationTest, LargeCookieParsingMany) {
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
Http::TestHeaderMapImpl request_headers{{":method", "POST"},
{":path", "/test/long/url"},
{... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 2,055,591,482,219,799,200,000,000,000,000,000,000 | 17 | 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... |
root_distance(
struct peer *peer /* peer structure pointer */
)
{
double dtemp;
/*
* Root Distance (LAMBDA) is defined as:
* (delta + DELTA)/2 + epsilon + EPSILON + phi
*
* where:
* delta is the round-trip delay
* DELTA is the root delay
* epsilon is the remote server precision + local precisi... | 0 | [
"CWE-287"
] | ntp | aa44b5835d69d8ee031736bb8ee2730a514edb7d | 215,012,032,183,805,300,000,000,000,000,000,000,000 | 41 | [Bug 2941] NAK to the Future: Symmetric association authentication bypass via crypto-NAK |
static void SerializeGltfAccessor(Accessor &accessor, json &o) {
if (accessor.bufferView >= 0)
SerializeNumberProperty<int>("bufferView", accessor.bufferView, o);
if (accessor.byteOffset != 0)
SerializeNumberProperty<int>("byteOffset", int(accessor.byteOffset), o);
SerializeNumberProperty<int>("componen... | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 112,359,785,389,516,740,000,000,000,000,000,000,000 | 70 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
int RGWInitMultipart_ObjStore_S3::get_params()
{
RGWAccessControlPolicy_S3 s3policy(s->cct);
op_ret = create_s3_policy(s, store, s3policy, s->owner);
if (op_ret < 0)
return op_ret;
policy = s3policy;
return 0;
} | 0 | [
"CWE-79"
] | ceph | 8f90658c731499722d5f4393c8ad70b971d05f77 | 315,039,938,725,904,660,000,000,000,000,000,000,000 | 11 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static void __exit gadget_cfs_exit(void)
{
configfs_unregister_subsystem(&gadget_subsys);
} | 0 | [
"CWE-125"
] | linux | 15753588bcd4bbffae1cca33c8ced5722477fe1f | 167,581,167,575,248,200,000,000,000,000,000,000,000 | 4 | USB: gadget: fix illegal array access in binding with UDC
FuzzUSB (a variant of syzkaller) found an illegal array access
using an incorrect index while binding a gadget with UDC.
Reference: https://www.spinics.net/lists/linux-usb/msg194331.html
This bug occurs when a size variable used for a buffer
is misused to acc... |
my_bool check_histignore(const char *string)
{
uint i;
int rc;
LEX_STRING *tmp;
DBUG_ENTER("check_histignore");
for (i= 0; i < histignore_patterns.elements; i++)
{
tmp= dynamic_element(&histignore_patterns, i, LEX_STRING *);
if ((rc= charset_info->coll->wildcmp(charset_info,
... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 320,252,519,576,977,930,000,000,000,000,000,000,000 | 21 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
void operator()(OpKernelContext* context, const T1* input_data,
int input_batches, int input_height, int input_width,
int input_depth, int input_offset, const T2* filter_data,
int filter_height, int filter_width, int filter_count,
int filter_offs... | 1 | [
"CWE-369"
] | tensorflow | cfa91be9863a91d5105a3b4941096044ab32036b | 152,223,933,423,653,800,000,000,000,000,000,000,000 | 246 | Fix one FPE and remove two CHECK-fails.
PiperOrigin-RevId: 369349640
Change-Id: I1fedbfc2b5bab635c5cb51f103d7c9176f79831a |
int sctp_assoc_set_id(struct sctp_association *asoc, gfp_t gfp)
{
bool preload = !!(gfp & __GFP_WAIT);
int ret;
/* If the id is already assigned, keep it. */
if (asoc->assoc_id)
return 0;
if (preload)
idr_preload(gfp);
spin_lock_bh(&sctp_assocs_id_lock);
/* 0 is not a valid assoc_id, must be >= 1 */
ret =... | 0 | [
"CWE-20",
"CWE-241"
] | linux | d3217b15a19a4779c39b212358a5c71d725822ee | 119,414,420,278,003,010,000,000,000,000,000,000,000 | 23 | sctp: Fix sk_ack_backlog wrap-around problem
Consider the scenario:
For a TCP-style socket, while processing the COOKIE_ECHO chunk in
sctp_sf_do_5_1D_ce(), after it has passed a series of sanity check,
a new association would be created in sctp_unpack_cookie(), but afterwards,
some processing maybe failed, and sctp_as... |
static int stbi__sse2_available(void)
{
int info3 = stbi__cpuid3();
return ((info3 >> 26) & 1) != 0;
} | 0 | [
"CWE-787"
] | stb | 5ba0baaa269b3fd681828e0e3b3ac0f1472eaf40 | 167,279,965,560,391,090,000,000,000,000,000,000,000 | 5 | stb_image: Reject fractional JPEG component subsampling ratios
The component resamplers are not written to support this and I've
never seen it happen in a real (non-crafted) JPEG file so I'm
fine rejecting this as outright corrupt.
Fixes issue #1178. |
urlCheckRequest(const HttpRequest * r)
{
int rc = 0;
/* protocol "independent" methods
*
* actually these methods are specific to HTTP:
* they are methods we receive on our HTTP port,
* and if we had a FTP listener would not be relevant
* there.
*
* So, we should delegate them... | 0 | [
"CWE-20"
] | squid | dfd818595b54942cb1adc45f6aed95c9b706e3a8 | 65,598,972,857,075,085,000,000,000,000,000,000,000 | 74 | Merge pull request from GHSA-jvf6-h9gj-pmj6
* Add slash prefix to path-rootless or path-noscheme URLs
* Update src/anyp/Uri.cc
Co-authored-by: Alex Rousskov <rousskov@measurement-factory.com>
* restore file trailer GH auto-removes
* Remove redundant path-empty check
* Removed stale comment left behind by b2ab59a
... |
_kdc_as_rep(kdc_request_t r,
krb5_data *reply,
const char *from,
struct sockaddr *from_addr,
int datagram_reply)
{
krb5_context context = r->context;
krb5_kdc_configuration *config = r->config;
KDC_REQ *req = &r->req;
KDC_REQ_BODY *b = NULL;
AS_REP rep;
KDCOptions f;
krb5... | 0 | [
"CWE-476"
] | heimdal | 1a6a6e462dc2ac6111f9e02c6852ddec4849b887 | 293,963,776,723,661,050,000,000,000,000,000,000,000 | 671 | Security: Avoid NULL structure pointer member dereference
This can happen in the error path when processing malformed AS
requests with a NULL client name. Bug originally introduced on
Fri Feb 13 09:26:01 2015 +0100 in commit:
a873e21d7c06f22943a90a41dc733ae76799390d
kdc: base _kdc_fast_mk_error() on krb5_mk... |
uintmax_from_header (const char *p, size_t s)
{
return from_header (p, s, "uintmax_t", 0, UINTMAX_MAX, false, false);
} | 0 | [
"CWE-125"
] | tar | d9d4435692150fa8ff68e1b1a473d187cc3fd777 | 77,693,620,704,750,590,000,000,000,000,000,000,000 | 4 | 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. |
my_ok(THD *thd, ulonglong affected_rows= 0, ulonglong id= 0,
const char *message= NULL)
{
thd->set_row_count_func(affected_rows);
thd->get_stmt_da()->set_ok_status(affected_rows, id, message);
} | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 266,216,381,418,862,750,000,000,000,000,000,000,000 | 6 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
rxq_cq_to_mbuf(struct mlx5_rxq_data *rxq, struct rte_mbuf *pkt,
volatile struct mlx5_cqe *cqe,
volatile struct mlx5_mini_cqe8 *mcqe)
{
/* Update packet information. */
pkt->packet_type = rxq_cq_to_pkt_type(rxq, cqe, mcqe);
if (rxq->rss_hash) {
uint32_t rss_hash_res = 0;
/* If compressed, take h... | 0 | [] | dpdk-stable | ef311075d21b4f68c8ccfc46a00cda7c2a0bf4cc | 236,447,672,389,136,230,000,000,000,000,000,000,000 | 75 | net/mlx5: fix Rx queue recovery mechanism
The local variables are getting inconsistent in data receiving routines
after queue error recovery.
Receive queue consumer index is getting wrong, need to reset one to the
size of the queue (as RQ was fully replenished in recovery procedure).
In MPRQ case, also the local cons... |
static double poly_basis_dx(ssize_t n, double x, double y)
{
/* polynomial term for x derivative */
switch(n) {
case 0: return( 0.0 ); /* constant */
case 1: return( 1.0 );
case 2: return( 0.0 ); /* affine order = 1 terms = 3 */
case 3: return( y ); /* bilinear order = 1.5 terms ... | 0 | [] | ImageMagick6 | 4eafab89a2742865d770857a9d7434993f65ae6b | 75,497,303,366,847,430,000,000,000,000,000,000,000 | 28 | https://github.com/ImageMagick/ImageMagick/issues/3331 |
php_stream *php_stream_url_wrap_http(php_stream_wrapper *wrapper, const char *path, const char *mode, int options, zend_string **opened_path, php_stream_context *context STREAMS_DC) /* {{{ */
{
return php_stream_url_wrap_http_ex(wrapper, path, mode, options, opened_path, context, PHP_URL_REDIRECT_MAX, HTTP_WRAPPER_HEA... | 0 | [
"CWE-476"
] | php-src | 0e097f2c96ce31b16fa371981045f224e5a37160 | 256,772,715,435,409,450,000,000,000,000,000,000,000 | 4 | Fixed bug #75535
The sizeof()s for Content-Length and Transfer-Encoding were missing
the trailing ":". Apart from being generally wrong, this no longer
verified that the header actually contains a colon, leading to the
null http_header_value being used.
Additionally, in the interest of being defensive, also make sure... |
free_cmdmod(void)
{
if (cmdmod.save_ei != NULL)
{
/* Restore 'eventignore' to the value before ":noautocmd". */
set_string_option_direct((char_u *)"ei", -1, cmdmod.save_ei,
OPT_FREE, SID_NONE);
free_string_option(cmdmod.save_ei);
}
if (cmdmod.filter_regmatch.regprog != NULL)
vim_regfree(cm... | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 284,999,426,189,957,400,000,000,000,000,000,000,000 | 13 | 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. |
find_str_at_start_of_line(const char *haystack, const char *needle)
{
size_t needle_len = strlen(needle);
do {
if (!strncmp(haystack, needle, needle_len))
return haystack;
haystack = strchr(haystack, '\n');
if (!haystack)
return NULL;
else
++haystack;
} while (*haystack);
re... | 0 | [] | tor | 973c18bf0e84d14d8006a9ae97fde7f7fb97e404 | 71,216,503,851,000,150,000,000,000,000,000,000,000 | 17 | Fix assertion failure in tor_timegm.
Fixes bug 6811. |
get_dir_size (FrWindow *window,
const char *current_dir,
const char *name)
{
guint64 size;
char *dirname;
int dirname_l;
int i;
dirname = g_strconcat (current_dir, name, "/", NULL);
dirname_l = strlen (dirname);
size = 0;
for (i = 0; i < window->archive->files->len; i++) {
File... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 300,931,786,813,915,900,000,000,000,000,000,000,000 | 24 | libarchive: sanitize filenames before extracting |
ves_icall_System_Threading_Interlocked_Exchange_Double (gdouble *location, gdouble value)
{
#if SIZEOF_VOID_P == 8
LongDoubleUnion val, ret;
val.fval = value;
ret.ival = (gint64)InterlockedExchangePointer((gpointer *) location, (gpointer)val.ival);
return ret.fval;
#else
gdouble res;
/*
* According to MSDN,... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 91,748,924,667,048,600,000,000,000,000,000,000,000 | 24 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
static void io_req_task_submit(struct callback_head *cb)
{
struct io_kiocb *req = container_of(cb, struct io_kiocb, task_work);
struct io_ring_ctx *ctx = req->ctx;
__io_req_task_submit(req);
percpu_ref_put(&ctx->refs);
} | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 43,200,603,304,344,560,000,000,000,000,000,000,000 | 8 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
set_sal_first(slang_T *lp)
{
salfirst_T *sfirst;
int i;
salitem_T *smp;
int c;
garray_T *gap = &lp->sl_sal;
sfirst = lp->sl_sal_first;
for (i = 0; i < 256; ++i)
sfirst[i] = -1;
smp = (salitem_T *)gap->ga_data;
for (i = 0; i < gap->ga_len; ++i)
{
if (has_mbyte)
// Use th... | 0 | [
"CWE-787"
] | vim | 7c824682d2028432ee082703ef0ab399867a089b | 203,115,115,180,751,800,000,000,000,000,000,000,000 | 54 | patch 8.2.4919: can add invalid bytes with :spellgood
Problem: Can add invalid bytes with :spellgood.
Solution: Check for a valid word string. |
Item_cache(THD *thd):
Item_basic_constant(thd),
Type_handler_hybrid_field_type(MYSQL_TYPE_STRING),
example(0), cached_field(0),
value_cached(0)
{
fixed= 1;
maybe_null= 1;
null_value= 1;
null_value_inside= true;
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 34,577,753,386,699,998,000,000,000,000,000,000,000 | 11 | 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.... |
ofputil_decode_packet_out(struct ofputil_packet_out *po,
const struct ofp_header *oh,
struct ofpbuf *ofpacts)
{
struct ofpbuf b = ofpbuf_const_initializer(oh, ntohs(oh->length));
enum ofpraw raw = ofpraw_pull_assert(&b);
ofpbuf_clear(ofpacts);
if (raw... | 0 | [
"CWE-617",
"CWE-703"
] | ovs | 4af6da3b275b764b1afe194df6499b33d2bf4cde | 313,712,812,758,399,860,000,000,000,000,000,000,000 | 62 | ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command.
When decoding a group mod, the current code validates the group type and
command after the whole group mod has been decoded. The OF1.5 decoder,
however, tries to use the type and command earlier, when it might still be
invalid. This caused an... |
int json_array_append_new(json_t *json, json_t *value)
{
json_array_t *array;
if(!value)
return -1;
if(!json_is_array(json) || json == value)
{
json_decref(value);
return -1;
}
array = json_to_array(json);
if(!json_array_grow(array, 1, 1)) {
json_decref(val... | 0 | [
"CWE-310"
] | jansson | 8f80c2d83808150724d31793e6ade92749b1faa4 | 140,205,059,463,645,630,000,000,000,000,000,000,000 | 24 | CVE-2013-6401: Change hash function, randomize hashes
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing. |
static bool bin_pe_init_metadata_hdr(RBinPEObj* pe) {
PE_(image_metadata_header) * metadata = R_NEW0 (PE_(image_metadata_header));
if (!metadata) {
return false;
}
PE_DWord metadata_directory = pe->clr_hdr? PE_(va2pa) (pe, pe->clr_hdr->MetaDataDirectoryAddress): 0;
if (!metadata_directory) {
free (metadata);
... | 0 | [
"CWE-400",
"CWE-703"
] | radare2 | 634b886e84a5c568d243e744becc6b3223e089cf | 125,165,642,732,069,190,000,000,000,000,000,000,000 | 113 | Fix DoS in PE/QNX/DYLDCACHE/PSX parsers ##crash
* Reported by lazymio
* Reproducer: AAA4AAAAAB4= |
GF_Err av1dmx_parse_av1(GF_Filter *filter, GF_AV1DmxCtx *ctx)
{
GF_Err e = GF_OK;
u64 start;
if (!ctx->is_playing) {
ctx->state.frame_state.is_first_frame = GF_TRUE;
}
/*we process each TU and extract only the necessary OBUs*/
start = gf_bs_get_position(ctx->bs);
switch (ctx->bsmode) {
case OBUs:
//first ... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | 13dad7d5ef74ca2e6fe4010f5b03eb12e9bbe0ec | 273,581,855,298,955,640,000,000,000,000,000,000,000 | 67 | fixed #1719 |
static void wcd9335_codec_remove(struct snd_soc_component *comp)
{
struct wcd9335_codec *wcd = dev_get_drvdata(comp->dev);
wcd_clsh_ctrl_free(wcd->clsh_ctrl);
free_irq(regmap_irq_get_virq(wcd->irq_data, WCD9335_IRQ_SLIMBUS), wcd);
} | 0 | [] | sound | a54988113985ca22e414e132054f234fc8a92604 | 26,975,392,162,772,994,000,000,000,000,000,000,000 | 7 | wcd9335: fix a incorrect use of kstrndup()
In wcd9335_codec_enable_dec(), 'widget_name' is allocated by kstrndup().
However, according to doc: "Note: Use kmemdup_nul() instead if the size
is known exactly." So we should use kmemdup_nul() here instead of
kstrndup().
Signed-off-by: Gen Zhang <blackgod016574@gmail.com>
... |
std::string Magick::Image::x11Display(void) const
{
return(constOptions()->x11Display());
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 202,321,660,335,657,600,000,000,000,000,000,000,000 | 4 | Added missing return to avoid use after free. |
static int ebcdic_puts(BIO *bp, const char *str)
{
if (bp->next_bio == NULL)
return (0);
return ebcdic_write(bp, str, strlen(str));
} | 0 | [
"CWE-399"
] | openssl | 380f18ed5f140e0ae1b68f3ab8f4f7c395658d9e | 8,164,561,524,224,218,000,000,000,000,000,000,000 | 6 | CVE-2016-0798: avoid memory leak in SRP
The SRP user database lookup method SRP_VBASE_get_by_user had confusing
memory management semantics; the returned pointer was sometimes newly
allocated, and sometimes owned by the callee. The calling code has no
way of distinguishing these two cases.
Specifically, SRP servers t... |
PyRun_InteractiveOne(FILE *f, const char *p)
{
return PyRun_InteractiveOneFlags(f, p, NULL);
} | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 126,919,925,283,001,920,000,000,000,000,000,000,000 | 4 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
ialloc_gc_prepare(gs_ref_memory_t * mem)
{ /*
* We have to unlink every stream from its neighbors,
* so that referenced streams don't keep all streams around.
*/
while (mem->streams != 0) {
stream *s = mem->streams;
mem->streams = s->next;
s->prev = s->next = 0;
... | 0 | [
"CWE-190"
] | ghostpdl | cfde94be1d4286bc47633c6e6eaf4e659bd78066 | 210,484,828,219,946,170,000,000,000,000,000,000,000 | 12 | Bug 697985: bounds check the array allocations methods
The clump allocator has four allocation functions that use 'number of elements'
and 'size of elements' parameters (rather than a simple 'number of bytes').
Those need specific bounds checking. |
bool CStringCopy(const char *source_buf, char *dest_buf, size_t size) {
int ret = snprintf(dest_buf, size, "%s", source_buf);
return ret >= 0 && static_cast<size_t>(ret) < size;
} | 0 | [
"CWE-787"
] | asylo | bda9772e7872b0d2b9bee32930cf7a4983837b39 | 129,309,083,863,273,200,000,000,000,000,000,000,000 | 4 | Check input length in FromLinuxSockAddr
PiperOrigin-RevId: 333785506
Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9 |
bash_complete_command_internal (what_to_do)
int what_to_do;
{
return bash_specific_completion (what_to_do, command_word_completion_function);
} | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 32,979,215,586,374,700,000,000,000,000,000,000,000 | 5 | Bash-4.4 patch 7 |
static uint8_t readint8(char *buf)
{
return *(uint8_t *) buf;
} | 0 | [
"CWE-78",
"CWE-216"
] | runc | 0a8e4117e7f715d5fbeef398405813ce8e88558b | 97,032,610,720,910,700,000,000,000,000,000,000,000 | 4 | nsenter: clone /proc/self/exe to avoid exposing host binary to container
There are quite a few circumstances where /proc/self/exe pointing to a
pretty important container binary is a _bad_ thing, so to avoid this we
have to make a copy (preferably doing self-clean-up and not being
writeable).
We require memfd_create(... |
static void tulip_xmit_list_update(TULIPState *s)
{
struct tulip_descriptor desc;
if (tulip_ts(s) != CSR5_TS_SUSPENDED) {
return;
}
for (;;) {
tulip_desc_read(s, s->current_tx_desc, &desc);
tulip_dump_tx_descriptor(s, &desc);
if (!(desc.status & TDES0_OWN)) {
... | 1 | [
"CWE-787"
] | qemu | 8ffb7265af64ec81748335ec8f20e7ab542c3850 | 213,862,295,422,763,060,000,000,000,000,000,000,000 | 36 | net: tulip: check frame size and r/w data length
Tulip network driver while copying tx/rx buffers does not check
frame size against r/w data length. This may lead to OOB buffer
access. Add check to avoid it.
Limit iterations over descriptors to avoid potential infinite
loop issue in tulip_xmit_list_update.
Reported-... |
in_html_tag(
int end_tag)
{
char_u *line = ml_get_curline();
char_u *p;
int c;
int lc = NUL;
pos_T pos;
if (enc_dbcs)
{
char_u *lp = NULL;
// We search forward until the cursor, because searching backwards is
// very slow for DBCS encodings.
for (p = line; p < line + curwin->w_c... | 0 | [
"CWE-126",
"CWE-787"
] | vim | 53a70289c2712808e6d4e88927e03cac01b470dd | 117,279,857,958,413,020,000,000,000,000,000,000,000 | 66 | patch 8.2.4925: trailing backslash may cause reading past end of line
Problem: Trailing backslash may cause reading past end of line.
Solution: Check for NUL after backslash. |
int nfs4_set_lock_state(struct nfs4_state *state, struct file_lock *fl)
{
struct nfs4_lock_state *lsp;
if (fl->fl_ops != NULL)
return 0;
lsp = nfs4_get_lock_state(state, fl->fl_owner);
if (lsp == NULL)
return -ENOMEM;
fl->fl_u.nfs4_fl.owner = lsp;
fl->fl_ops = &nfs4_fl_lock_ops;
return 0;
} | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 116,620,204,841,999,280,000,000,000,000,000,000,000 | 13 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
void ConnectionManagerImpl::ActiveStream::addEncodedData(ActiveStreamEncoderFilter& filter,
Buffer::Instance& data, bool streaming) {
if (state_.filter_call_state_ == 0 ||
(state_.filter_call_state_ & FilterCallState::EncodeHeaders) ||
(state_.filte... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 31,766,612,864,214,700,000,000,000,000,000,000,000 | 21 | 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... |
e_ews_config_lookup_result_class_init (EEwsConfigLookupResultClass *klass)
{
EConfigLookupResultSimpleClass *simple_result_class;
simple_result_class = E_CONFIG_LOOKUP_RESULT_SIMPLE_CLASS (klass);
simple_result_class->configure_source = ews_config_lookup_result_configure_source;
} | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 188,607,697,133,120,340,000,000,000,000,000,000,000 | 7 | 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 |
static int i_ipmi_request(struct ipmi_user *user,
struct ipmi_smi *intf,
struct ipmi_addr *addr,
long msgid,
struct kernel_ipmi_msg *msg,
void *user_msg_data,
void *supplied_smi,
struct ipmi_recv_msg *supplied_recv,
int... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 4aa7afb0ee20a97fbf0c5bab3df028d5fb85fdab | 336,016,716,388,660,530,000,000,000,000,000,000,000 | 88 | ipmi: Fix memory leak in __ipmi_bmc_register
In the impelementation of __ipmi_bmc_register() the allocated memory for
bmc should be released in case ida_simple_get() fails.
Fixes: 68e7e50f195f ("ipmi: Don't use BMC product/dev ids in the BMC name")
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Message-Id... |
execute_until_command (while_command)
WHILE_COM *while_command;
{
return (execute_while_or_until (while_command, CMD_UNTIL));
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 198,389,718,731,674,080,000,000,000,000,000,000,000 | 5 | bash-4.4-rc2 release |
static void le_scan_restart_work(struct work_struct *work)
{
struct hci_dev *hdev = container_of(work, struct hci_dev,
le_scan_restart.work);
unsigned long timeout, duration, scan_start, now;
u8 status;
bt_dev_dbg(hdev, "");
hci_req_sync(hdev, le_scan_restart, 0, HCI_CMD_TIMEOUT, &status);
if (status) ... | 0 | [
"CWE-362"
] | linux | e2cb6b891ad2b8caa9131e3be70f45243df82a80 | 94,105,557,287,814,800,000,000,000,000,000,000,000 | 49 | bluetooth: eliminate the potential race condition when removing the HCI controller
There is a possible race condition vulnerability between issuing a HCI
command and removing the cont. Specifically, functions hci_req_sync()
and hci_dev_do_close() can race each other like below:
thread-A in hci_req_sync() | th... |
int32_t ZrtpQueue::sendDataZRTP(const unsigned char *data, int32_t length) {
OutgoingZRTPPkt* packet = new OutgoingZRTPPkt(data, length);
packet->setSSRC(getLocalSSRC());
packet->setSeqNum(senderZrtpSeqNo++);
/*
* Compute the ZRTP CRC over the full ZRTP packet. Thus include
* the fixed pac... | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 305,535,020,595,452,000,000,000,000,000,000,000,000 | 27 | 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 |
nma_gconf_settings_get_by_connection (NMAGConfSettings *self,
NMConnection *connection)
{
NMAGConfSettingsPrivate *priv;
GSList *iter;
g_return_val_if_fail (NMA_IS_GCONF_SETTINGS (self), NULL);
g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL);
priv = NMA_GCONF_SETTINGS_GET_PRIVATE (self);
f... | 0 | [
"CWE-200"
] | network-manager-applet | 8627880e07c8345f69ed639325280c7f62a8f894 | 272,665,155,918,460,670,000,000,000,000,000,000,000 | 21 | editor: prevent any registration of objects on the system bus
D-Bus access-control is name-based; so requests for a specific name
are allowed/denied based on the rules in /etc/dbus-1/system.d. But
apparently apps still get a non-named service on the bus, and if we
register *any* object even though we don't have a nam... |
uint SSL_SESSION::GetBornOn() const
{
return bornOn_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 137,962,276,202,612,300,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
FindFile (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
IN EFI_DISK_IO_PROTOCOL *DiskIo,
IN UDF_VOLUME_INFO *Volume,
IN CHAR16 *FilePath,
IN UDF_FILE_INFO *Root,
IN UDF_FILE_INFO *Parent,
IN UDF_LO... | 0 | [] | edk2 | b9ae1705adfdd43668027a25a2b03c2e81960219 | 40,142,582,553,990,835,000,000,000,000,000,000,000 | 123 | MdeModulePkg/UdfDxe: Refine boundary checks for file/path name string
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=828
The commit refines the boundary checks for file/path name string to
prevent possible buffer overrun.
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: ... |
**/
inline void strunescape(char *const str) {
#define cimg_strunescape(ci,co) case ci : *nd = co; ++ns; break;
unsigned int val = 0;
for (char *ns = str, *nd = str; *ns || (bool)(*nd=0); ++nd) if (*ns=='\\') switch (*(++ns)) {
cimg_strunescape('a','\a');
cimg_strunescape('b'... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 317,016,995,304,803,600,000,000,000,000,000,000,000 | 27 | Fix other issues in 'CImg<T>::load_bmp()'. |
int vbin_printf(u32 *bin_buf, size_t size, const char *fmt, va_list args)
{
struct printf_spec spec = {0};
char *str, *end;
int width;
str = (char *)bin_buf;
end = (char *)(bin_buf + size);
#define save_arg(type) \
({ \
unsigned long long value; \
if (sizeof(type) == 8) { \
unsigned lon... | 0 | [
"CWE-200"
] | linux | 91efafb1dd8f471177a3dddb4841d75d3df1cc46 | 203,211,344,966,607,750,000,000,000,000,000,000,000 | 132 | lib/vsprintf: Replace space with '_' before crng is ready
Before crng is ready, output of "%p" composes of "(ptrval)" and
left padding spaces for alignment as no random address can be
generated. This seems a little strange when default string width
is larger than strlen("(ptrval)").
For example, when irq domain names... |
static int airo_set_mode(struct net_device *dev,
struct iw_request_info *info,
__u32 *uwrq,
char *extra)
{
struct airo_info *local = dev->ml_priv;
int reset = 0;
readConfigRid(local, 1);
if (sniffing_mode(local))
reset = 1;
switch(*uwrq) {
case IW_MODE_ADHOC:
local->config.opmode &= ~MODE_CFG_... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 17,438,618,223,745,419,000,000,000,000,000,000,000 | 58 | 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... |
void ignore_signal(int sig) {
LOG(level::WARN, "caught signal %d but ignored it", sig);
} | 0 | [
"CWE-943",
"CWE-787"
] | newsbeuter | 96e9506ae9e252c548665152d1b8968297128307 | 104,684,478,295,518,940,000,000,000,000,000,000,000 | 3 | Sanitize inputs to bookmark-cmd (#591)
Newsbeuter didn't properly shell-escape the arguments passed to
bookmarking command, which allows a remote attacker to perform remote
code execution by crafting an RSS item whose title and/or URL contain
something interpretable by the shell (most notably subshell
invocations.)
T... |
void ZrtpStateClass::setMultiStream(bool multi) {
multiStream = multi;
} | 0 | [
"CWE-119"
] | ZRTPCPP | c8617100f359b217a974938c5539a1dd8a120b0e | 24,554,140,149,716,034,000,000,000,000,000,000,000 | 3 | 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 |
is_wc2_option(optnam)
const char *optnam;
{
int k = 0;
while (wc2_options[k].wc_name) {
if (strcmp(wc2_options[k].wc_name, optnam) == 0)
return TRUE;
k++;
}
return FALSE;
} | 0 | [
"CWE-269"
] | NetHack | 612755bfb5c412079795c68ba392df5d93874ed8 | 145,569,443,504,672,770,000,000,000,000,000,000,000 | 11 | escapes() revamp
Partial rewrite of escapes(), mostly changing its if-then-else
logic so that end-of-string can be checked once instead for each case.
The previous version had a bug if the input string ended with backslash
and one decimal digit (due to being lumped together with the handling
for trailing \X or \O... |
p11_rpc_buffer_add_date_value (p11_buffer *buffer,
const void *value,
CK_ULONG value_length)
{
CK_DATE date_value;
unsigned char array[8];
unsigned char *ptr = NULL;
/* Check if value is empty or can be converted to CK_DATE. */
if (value_length != 0 && value_length != sizeof (CK_DATE)) {
p11... | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 26,895,450,984,554,070,000,000,000,000,000,000,000 | 24 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. |
next_brace_sub (const char *cp, int flags)
{
size_t depth = 0;
while (*cp != '\0')
if ((flags & GLOB_NOESCAPE) == 0 && *cp == '\\')
{
if (*++cp == '\0')
break;
++cp;
}
else
{
if ((*cp == '}' && depth-- == 0) || (*cp == ',' && depth == 0))
break;
... | 0 | [
"CWE-119"
] | gnulib | 2d1bd71ec70a31b01d01b734faa66bb1ed28961f | 29,561,219,360,297,743,000,000,000,000,000,000,000 | 21 | glob: fix heap buffer overflow
* lib/glob.c (glob): Fix off-by-one error introduced into
glibc in commit dd7d45e838a42b0ed470c44b55901ea98d0c2bab
dated 1997-10-29 20:33:40. Problem reported by Tim Rühsen in:
https://sourceware.org/bugzilla/show_bug.cgi?id=22320
Fix suggested by Bruno Haible. |
static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu)
{
if (!cpu_has_virtual_nmis())
return to_vmx(vcpu)->soft_vnmi_blocked;
return vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_NMI;
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 99,597,524,444,797,360,000,000,000,000,000,000,000 | 6 | 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-... |
pfm_free_fd(int fd, struct file *file)
{
struct files_struct *files = current->files;
struct fdtable *fdt;
/*
* there ie no fd_uninstall(), so we do it here
*/
spin_lock(&files->file_lock);
fdt = files_fdtable(files);
rcu_assign_pointer(fdt->fd[fd], NULL);
spin_unlock(&files->file_lock);
if (file)
put_... | 0 | [] | linux-2.6 | 41d5e5d73ecef4ef56b7b4cde962929a712689b4 | 254,850,205,251,905,500,000,000,000,000,000,000,000 | 17 | [IA64] permon use-after-free fix
Perfmon associates vmalloc()ed memory with a file descriptor, and installs
a vma mapping that memory. Unfortunately, the vm_file field is not filled
in, so processes with mappings to that memory do not prevent the file from
being closed and the memory freed. This results in use-after... |
static int bad_inode_mkdir(struct inode *dir, struct dentry *dentry,
int mode)
{
return -EIO;
} | 0 | [] | linux-2.6 | be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8 | 119,654,660,210,671,880,000,000,000,000,000,000,000 | 5 | [PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
CVE-2006-5753 is for a case where an inode can be marked bad, switching
the ops to bad_inode_ops, which are all connected as:
static int return_EIO(void)
{
return -EIO;
}
#define EIO_ERROR ((void *) (return_EIO))
static struct ino... |
static bool nested_get_vmcs12_pages(struct kvm_vcpu *vcpu,
struct vmcs12 *vmcs12)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
if (nested_cpu_has2(vmcs12, SECONDARY_EXEC_VIRTUALIZE_APIC_ACCESSES)) {
/* TODO: Also verify bits beyond physical address width are 0 */
if (!PAGE_ALIGNED(vmcs12->apic_access_addr))
re... | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 14,637,932,701,410,566,000,000,000,000,000,000,000 | 48 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
static int __init hugepages_setup(char *s)
{
unsigned long *mhp;
static unsigned long *last_mhp;
if (!parsed_valid_hugepagesz) {
pr_warn("HugeTLB: hugepages=%s does not follow a valid hugepagesz, ignoring\n", s);
parsed_valid_hugepagesz = true;
return 0;
}
/*
* !hugetlb_max_hstate means we haven't parsed... | 0 | [
"CWE-362"
] | linux | 17743798d81238ab13050e8e2833699b54e15467 | 142,607,110,272,172,270,000,000,000,000,000,000,000 | 42 | mm/hugetlb: fix a race between hugetlb sysctl handlers
There is a race between the assignment of `table->data` and write value
to the pointer of `table->data` in the __do_proc_doulongvec_minmax() on
the other thread.
CPU0: CPU1:
proc_sys_write
... |
static void
ensure_generic_class_runtime_vtable (MonoClass *klass)
{
MonoClass *gklass = klass->generic_class->container_class;
int i;
if (klass->wastypebuilder)
return;
ensure_runtime_vtable (gklass);
klass->method.count = gklass->method.count;
klass->methods = mono_image_alloc (klass->image, sizeof (MonoMe... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 264,978,453,565,835,050,000,000,000,000,000,000,000 | 34 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
void md5_update(MD5CTX c, const void *data, unsigned long len) {
gcry_md_write(c,data,len);
} | 0 | [
"CWE-310"
] | libssh | e99246246b4061f7e71463f8806b9dcad65affa0 | 176,706,566,052,001,900,000,000,000,000,000,000,000 | 3 | security: fix for vulnerability CVE-2014-0017
When accepting a new connection, a forking server based on libssh forks
and the child process handles the request. The RAND_bytes() function of
openssl doesn't reset its state after the fork, but simply adds the
current process id (getpid) to the PRNG state, which is not g... |
end_visual_mode_keep_button()
{
#ifdef FEAT_CLIPBOARD
/*
* If we are using the clipboard, then remember what was selected in case
* we need to paste it somewhere while we still own the selection.
* Only do this when the clipboard is already owned. Don't want to grab
* the selection when hitting... | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 226,820,862,624,734,600,000,000,000,000,000,000,000 | 43 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
static unsigned long int php_swf_get_bits (unsigned char* buffer, unsigned int pos, unsigned int count)
{
unsigned int loop;
unsigned long int result = 0;
for (loop = pos; loop < pos + count; loop++)
{
result = result +
((((buffer[loop / 8]) >> (7 - (loop % 8))) & 0x01) << (count - (loop - pos) - 1));
}
ret... | 0 | [] | php-src | 87829c09a1d9e39bee994460d7ccf19dd20eda14 | 116,363,989,125,697,540,000,000,000,000,000,000,000 | 12 | Fix #70052: getimagesize() fails for very large and very small WBMP
Very large WBMP (width or height greater than 2**31-1) cause an overflow and
circumvent the size limitation of 2048x2048 px. Very small WBMP (less than 12
bytes) cause a read error and are not recognized. This patch fixes both bugs. |
ZEND_API int ZEND_FASTCALL string_compare_function_ex(zval *op1, zval *op2, zend_bool case_insensitive) /* {{{ */
{
zend_string *tmp_str1, *tmp_str2;
zend_string *str1 = zval_get_tmp_string(op1, &tmp_str1);
zend_string *str2 = zval_get_tmp_string(op2, &tmp_str2);
int ret;
if (case_insensitive) {
ret = zend_bina... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 336,040,059,003,830,330,000,000,000,000,000,000,000 | 17 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
void mg_http_write_chunk(struct mg_connection *c, const char *buf, size_t len) {
mg_printf(c, "%lX\r\n", (unsigned long) len);
mg_send(c, buf, len);
mg_send(c, "\r\n", 2);
} | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 56,708,853,565,648,830,000,000,000,000,000,000,000 | 5 | Protect against the directory traversal in mg_upload() |
getRuleDotsText (FileInfo * nested, CharsString * ruleDots)
{
CharsString token;
if (getToken (nested, &token, "characters"))
if (parseChars (nested, ruleDots, &token))
return 1;
return 0;
} | 0 | [] | liblouis | dc97ef791a4fae9da11592c79f9f79e010596e0c | 59,127,145,581,883,860,000,000,000,000,000,000,000 | 8 | Merge branch 'table_resolver' |
bool is_bzip2_file(const std::string& filename)
{
return (filename.length() > 4
&& filename.substr(filename.length() - 4) == ".bz2");
} | 0 | [
"CWE-200"
] | wesnoth | f8914468182e8d0a1551b430c0879ba236fe4d6d | 170,779,377,105,667,000,000,000,000,000,000,000,000 | 5 | Disallow inclusion of .pbl files from WML (bug #23504)
Note that this will also cause Lua wesnoth.have_file() to return false
on .pbl files. |
NTSTATUS hardlink_internals(TALLOC_CTX *ctx,
connection_struct *conn,
const struct smb_filename *smb_fname_old,
const struct smb_filename *smb_fname_new)
{
NTSTATUS status = NT_STATUS_OK;
/* source must already exist. */
if (!VALID_STAT(smb_fname_old->st)) {
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
}
/* D... | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 43,245,083,220,031,750,000,000,000,000,000,000,000 | 40 | Fix bug 7104 - "wide links" and "unix extensions" are incompatible.
Change parameter "wide links" to default to "no".
Ensure "wide links = no" if "unix extensions = yes" on a share.
Fix man pages to refect this.
Remove "within share" checks for a UNIX symlink set - even if
widelinks = no. The server will not follow t... |
X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx)
{
if (ctx->cert != NULL)
return ctx->cert->key->x509;
else
return NULL;
} | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 333,825,726,317,985,550,000,000,000,000,000,000,000 | 7 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
*/
void bfq_weights_tree_add(struct bfq_data *bfqd, struct bfq_queue *bfqq,
struct rb_root_cached *root)
{
struct bfq_entity *entity = &bfqq->entity;
struct rb_node **new = &(root->rb_root.rb_node), *parent = NULL;
bool leftmost = true;
/*
* Do not insert if the queue is already associated with a
* count... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 289,029,692,295,004,800,000,000,000,000,000,000,000 | 67 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
int snd_pcm_hw_constraint_ratnums(struct snd_pcm_runtime *runtime,
unsigned int cond,
snd_pcm_hw_param_t var,
const struct snd_pcm_hw_constraint_ratnums *r)
{
return snd_pcm_hw_rule_add(runtime, cond, var,
snd_pcm_hw_rule_ratnums, (void *)r,
var, -1);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 3aa02cb664c5fb1042958c8d1aa8c35055a2ebc4 | 23,826,354,020,007,293,000,000,000,000,000,000,000 | 9 | ALSA: pcm : Call kill_fasync() in stream lock
Currently kill_fasync() is called outside the stream lock in
snd_pcm_period_elapsed(). This is potentially racy, since the stream
may get released even during the irq handler is running. Although
snd_pcm_release_substream() calls snd_pcm_drop(), this doesn't
guarantee th... |
bool HttpHealthCheckerImpl::HttpStatusChecker::inRanges(
uint64_t http_status, const std::vector<std::pair<uint64_t, uint64_t>>& ranges) {
for (const auto& range : ranges) {
if (http_status >= range.first && http_status < range.second) {
return true;
}
}
return false;
} | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 124,669,917,158,967,000,000,000,000,000,000,000,000 | 10 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.