func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int wc_ecc_encrypt(ecc_key* privKey, ecc_key* pubKey, const byte* msg,
word32 msgSz, byte* out, word32* outSz, ecEncCtx* ctx)
{
int ret = 0;
word32 blockSz;
word32 digestSz;
ecEncCtx localCtx;
#ifdef WOLFSSL_SMALL_STACK
byte* sharedSecret;
byte* ... | 0 | [
"CWE-200"
] | wolfssl | 9b9568d500f31f964af26ba8d01e542e1f27e5ca | 200,548,545,092,505,340,000,000,000,000,000,000,000 | 157 | Change ECDSA signing to use blinding. |
fm_directory_view_make_activation_parameters (GList *files,
GList **unhandled_files)
{
GList *ret, *l, *app_files;
NautilusFile *file;
GAppInfo *app, *old_app;
GHashTable *app_table;
ret = NULL;
*unhandled_files = NULL;
app_table = g_hash_table_new_full
((GHashFunc) mime_application_hash,
(GEqu... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 9,466,556,481,081,911,000,000,000,000,000,000,000 | 53 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static int on_fcn_rename(RAnal *_anal, void* _user, RAnalFunction *fcn, const char *oname) {
RCore *core = (RCore*)_user;
const char *cmd = r_config_get (core->config, "cmd.fcn.rename");
if (cmd && *cmd) {
// XXX: wat do with old name here?
ut64 oaddr = core->offset;
ut64 addr = fcn->addr;
r_core_seek (core,... | 0 | [
"CWE-415",
"CWE-703"
] | radare2 | cb8b683758edddae2d2f62e8e63a738c39f92683 | 190,466,924,840,418,030,000,000,000,000,000,000,000 | 13 | Fix #16303 - c->table_query double free (#16318) |
void sqlite3ResetAllSchemasOfConnection(sqlite3 *db){
int i;
sqlite3BtreeEnterAll(db);
for(i=0; i<db->nDb; i++){
Db *pDb = &db->aDb[i];
if( pDb->pSchema ){
if( db->nSchemaLock==0 ){
sqlite3SchemaClear(pDb->pSchema);
}else{
DbSetProperty(db, i, DB_ResetWanted);
}
}
}... | 0 | [
"CWE-674",
"CWE-787"
] | sqlite | 38096961c7cd109110ac21d3ed7dad7e0cb0ae06 | 286,103,097,631,555,070,000,000,000,000,000,000,000 | 20 | Avoid infinite recursion in the ALTER TABLE code when a view contains an unused CTE that references, directly or indirectly, the view itself.
FossilOrigin-Name: 1d2e53a39b87e364685e21de137655b6eee725e4c6d27fc90865072d7c5892b5 |
static int gs_can_open(struct net_device *netdev)
{
struct gs_can *dev = netdev_priv(netdev);
struct gs_usb *parent = dev->parent;
int rc, i;
struct gs_device_mode *dm;
u32 ctrlmode;
rc = open_candev(netdev);
if (rc)
return rc;
if (atomic_add_return(1, &parent->active_channels) == 1) {
for (i = 0; i < GS_... | 0 | [
"CWE-400",
"CWE-401"
] | linux | fb5be6a7b4863ecc44963bb80ca614584b6c7817 | 48,389,933,573,591,870,000,000,000,000,000,000,000 | 118 | can: gs_usb: gs_can_open(): prevent memory leak
In gs_can_open() if usb_submit_urb() fails the allocated urb should be
released.
Fixes: d08e973a77d1 ("can: gs_usb: Added support for the GS_USB CAN devices")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off... |
void AppLayerProtoDetectSupportedIpprotos(AppProto alproto, uint8_t *ipprotos)
{
SCEnter();
AppLayerProtoDetectPMGetIpprotos(alproto, ipprotos);
AppLayerProtoDetectPPGetIpprotos(alproto, ipprotos);
AppLayerProtoDetectPEGetIpprotos(alproto, ipprotos);
SCReturn;
} | 0 | [
"CWE-20"
] | suricata | 8357ef3f8ffc7d99ef6571350724160de356158b | 277,908,621,020,549,300,000,000,000,000,000,000,000 | 10 | proto/detect: workaround dns misdetected as dcerpc
The DCERPC UDP detection would misfire on DNS with transaction
ID 0x0400. This would happen as the protocol detection engine
gives preference to pattern based detection over probing parsers for
performance reasons.
This hack/workaround fixes this specific case by sti... |
struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned int flags,
int *peeked, int *off, int *err)
{
struct sk_buff *skb;
long timeo;
/*
* Caller is allowed not to check sk->sk_err before skb_recv_datagram()
*/
int error = sock_error(sk);
if (error)
goto no_packet;
timeo = sock_rcvtimeo(sk,... | 0 | [] | linux-2.6 | 77c1090f94d1b0b5186fb13a1b71b47b1343f87f | 151,462,521,600,223,920,000,000,000,000,000,000,000 | 56 | net: fix infinite loop in __skb_recv_datagram()
Tommi was fuzzing with trinity and reported the following problem :
commit 3f518bf745 (datagram: Add offset argument to __skb_recv_datagram)
missed that a raw socket receive queue can contain skbs with no payload.
We can loop in __skb_recv_datagram() with MSG_PEEK mode... |
mysql_select(THD *thd,
TABLE_LIST *tables, uint wild_num, List<Item> &fields,
COND *conds, uint og_num, ORDER *order, ORDER *group,
Item *having, ORDER *proc_param, ulonglong select_options,
select_result *result, SELECT_LEX_UNIT *unit,
SELECT_LEX *select_lex)
{
int err= 0;
bool free_... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 220,114,340,611,820,360,000,000,000,000,000,000,000 | 102 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
static char *dcc_chat_get_new_id(const char *nick)
{
char *id;
int num;
g_return_val_if_fail(nick != NULL, NULL);
if (dcc_chat_find_id(nick) == NULL) {
/* same as nick, good */
return g_strdup(nick);
}
/* keep adding numbers after nick until some of them isn't found */
for (num... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 248,496,883,772,249,700,000,000,000,000,000,000,000 | 20 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
njs_decode_hex_length(const njs_str_t *src, size_t *out_size)
{
if (out_size != NULL) {
*out_size = src->length / 2;
}
return 0;
} | 0 | [] | njs | 36f04a3178fcb6da8513cc3dbf35215c2a581b3f | 191,013,412,464,921,930,000,000,000,000,000,000,000 | 8 | Fixed String.prototype.replace() with byte strings.
This closes #522 issue on Github. |
void net_drop_ns(void *p)
{
struct net *ns = p;
if (ns && refcount_dec_and_test(&ns->passive))
net_free(ns);
} | 0 | [
"CWE-416"
] | linux | 21b5944350052d2583e82dd59b19a9ba94a007f0 | 88,088,209,529,891,530,000,000,000,000,000,000,000 | 6 | net: Fix double free and memory corruption in get_net_ns_by_id()
(I can trivially verify that that idr_remove in cleanup_net happens
after the network namespace count has dropped to zero --EWB)
Function get_net_ns_by_id() does not check for net::count
after it has found a peer in netns_ids idr.
It may dereference a... |
property_equal (MonoProperty *prop1, MonoProperty *prop2)
{
// Properties are hide-by-name-and-signature
if (!g_str_equal (prop1->name, prop2->name))
return FALSE;
if (prop1->get && prop2->get && !mono_metadata_signature_equal (mono_method_signature (prop1->get), mono_method_signature (prop2->get)))
return FALS... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 1,992,244,979,388,119,300,000,000,000,000,000,000 | 12 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
rpc_C_Finalize (CK_X_FUNCTION_LIST *self,
p11_rpc_message *msg)
{
BEGIN_CALL (Finalize);
PROCESS_CALL ((self, NULL));
END_CALL;
} | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 318,546,103,028,077,340,000,000,000,000,000,000,000 | 7 | Check for arithmetic overflows before allocating |
dtls1_retrieve_buffered_record(SSL *s, record_pqueue *queue)
{
pitem *item;
item = pqueue_pop(queue->q);
if (item)
{
dtls1_copy_record(s, item);
OPENSSL_free(item->data);
pitem_free(item);
return(1);
}
return(0);
} | 0 | [
"CWE-310"
] | openssl | 270881316664396326c461ec7a124aec2c6cc081 | 270,109,406,490,725,100,000,000,000,000,000,000,000 | 17 | Add and use a constant-time memcmp.
This change adds CRYPTO_memcmp, which compares two vectors of bytes in
an amount of time that's independent of their contents. It also changes
several MAC compares in the code to use this over the standard memcmp,
which may leak information about the size of a matching prefix.
(cher... |
int security_task_create(unsigned long clone_flags)
{
return security_ops->task_create(clone_flags);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 319,946,456,744,898,150,000,000,000,000,000,000,000 | 4 | 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... |
CIFSSMBFlush(const int xid, struct cifs_tcon *tcon, int smb_file_id)
{
int rc = 0;
FLUSH_REQ *pSMB = NULL;
cFYI(1, "In CIFSSMBFlush");
rc = small_smb_init(SMB_COM_FLUSH, 1, tcon, (void **) &pSMB);
if (rc)
return rc;
pSMB->FileID = (__u16) smb_file_id;
pSMB->ByteCount = 0;
rc = SendReceiveNoRsp(xid, tcon->se... | 0 | [
"CWE-362",
"CWE-119",
"CWE-189"
] | linux | 9438fabb73eb48055b58b89fc51e0bc4db22fabd | 183,945,051,695,055,720,000,000,000,000,000,000,000 | 19 | cifs: fix possible memory corruption in CIFSFindNext
The name_len variable in CIFSFindNext is a signed int that gets set to
the resume_name_len in the cifs_search_info. The resume_name_len however
is unsigned and for some infolevels is populated directly from a 32 bit
value sent by the server.
If the server sends a v... |
void usb_unregister_port(USBBus *bus, USBPort *port)
{
if (port->dev) {
object_unparent(OBJECT(port->dev));
}
QTAILQ_REMOVE(&bus->free, port, next);
bus->nfree--;
} | 0 | [
"CWE-119"
] | qemu | 9f8e9895c504149d7048e9fc5eb5cbb34b16e49a | 272,934,967,824,485,650,000,000,000,000,000,000,000 | 8 | usb: sanity check setup_index+setup_len in post_load
CVE-2013-4541
s->setup_len and s->setup_index are fed into usb_packet_copy as
size/offset into s->data_buf, it's possible for invalid state to exploit
this to load arbitrary data.
setup_len and setup_index should be checked to make sure
they are not negative.
Cc:... |
static void find_good_pkt_pointers(struct bpf_verifier_state *vstate,
struct bpf_reg_state *dst_reg,
enum bpf_reg_type type,
bool range_right_open)
{
int new_range, i;
if (dst_reg->off < 0 ||
(dst_reg->off == 0 && range_right_open))
/* This doesn't give us any range */
return;
if (dst... | 0 | [
"CWE-755"
] | bpf | 7d3baf0afa3aa9102d6a521a8e4c41888bb79882 | 134,912,121,842,572,470,000,000,000,000,000,000,000 | 74 | bpf: Fix kernel address leakage in atomic fetch
The change in commit 37086bfdc737 ("bpf: Propagate stack bounds to registers
in atomics w/ BPF_FETCH") around check_mem_access() handling is buggy since
this would allow for unprivileged users to leak kernel pointers. For example,
an atomic fetch/and with -1 on a stack d... |
static void restore_rgb_planes(uint8_t *src, int step, int stride, int width,
int height)
{
int i, j;
uint8_t r, g, b;
for (j = 0; j < height; j++) {
for (i = 0; i < width * step; i += step) {
r = src[i];
g = src[i + 1];
b = src[i +... | 0 | [
"CWE-125"
] | FFmpeg | e724bd1dd9efea3abb8586d6644ec07694afceae | 239,324,056,131,784,800,000,000,000,000,000,000,000 | 17 | avcodec/utvideodec: Check subsample factors
Fixes: Out of array read
Fixes: heap_poc
Found-by: GwanYeong Kim <gy741.kim@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7414d0bda7763f9bd69c26c068e482ab297c1c96)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc... |
TfLiteRegistration* Register_RESIZE_NEAREST_NEIGHBOR_GENERIC_OPT() {
static TfLiteRegistration r = {
nullptr, nullptr, resize_nearest_neighbor::Prepare,
resize_nearest_neighbor::Eval<
resize_nearest_neighbor::kGenericOptimized>};
return &r;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 186,807,872,885,294,040,000,000,000,000,000,000,000 | 7 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
TEST_F(QueryPlannerTest, MultikeyTwoConstraintsSameField) {
addIndex(BSON("a" << 1), true);
runQuery(fromjson("{a: {$gt: 0, $lt: 5}}"));
assertNumSolutions(3U);
assertSolutionExists("{cscan: {filter: {$and: [{a: {$lt: 5}}, {a: {$gt: 0}}]}, dir: 1}}");
assertSolutionExists(
"{fetch: {filter:... | 0 | [
"CWE-834"
] | mongo | 94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5 | 139,776,405,211,404,020,000,000,000,000,000,000,000 | 13 | SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch |
void CalendarRegressionTest::test4142933()
{
UErrorCode status = U_ZERO_ERROR;
GregorianCalendar *calendar = new GregorianCalendar(status);
if(U_FAILURE(status)) {
dataerrln("Error creating calendar %s", u_errorName(status));
delete calendar;
return;
}
//try {
calendar->roll((U... | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 318,129,109,179,774,000,000,000,000,000,000,000,000 | 25 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
TEST(Context, RequestAttributes) {
NiceMock<StreamInfo::MockStreamInfo> info;
NiceMock<StreamInfo::MockStreamInfo> empty_info;
Http::TestRequestHeaderMapImpl header_map{
{":method", "POST"}, {":scheme", "http"}, {":path", "/meow?yes=1"},
{":authority", "kittens.com"}, {"referer", "dogs.... | 1 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 90,407,546,335,595,130,000,000,000,000,000,000,000 | 162 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
main (int argc,
char **argv)
{
Gimp *gimp;
int result;
g_test_init (&argc, &argv, NULL);
gimp_test_utils_set_gimp3_directory ("GIMP_TESTING_ABS_TOP_SRCDIR",
"app/tests/gimpdir");
/* We share the same application instance across all tests. We need
* the G... | 0 | [
"CWE-20",
"CWE-476"
] | gimp | c21eff4b031acb04fb4dfce8bd5fdfecc2b6524f | 84,085,396,791,013,680,000,000,000,000,000,000,000 | 34 | Issue #1689: create unique temporary file with g_file_open_tmp().
Not sure this is really solving the issue reported, which is that
`g_get_tmp_dir()` uses environment variables (yet as g_file_open_tmp()
uses g_get_tmp_dir()…). But at least g_file_open_tmp() should create
unique temporary files, which prevents overridi... |
notEnoughData ()
{
throw InputExc ("Error in Huffman-encoded data "
"(decoded data are shorter than expected).");
} | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 21,935,059,492,454,207,000,000,000,000,000,000,000 | 5 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static int l_session_open (lua_State *L) {
int rc;
ssh_userdata *state = NULL;
luaL_checkinteger(L, 2);
lua_settop(L, 2);
state = (ssh_userdata *)lua_newuserdata(L, sizeof(ssh_userdata)); /* index 3 */
assert(lua_gettop(L) == 3);
state->session = NULL;
state->sp[0] = -1;
state->sp... | 0 | [
"CWE-415"
] | nmap | 350bbe0597d37ad67abe5fef8fba984707b4e9ad | 274,082,984,139,684,100,000,000,000,000,000,000,000 | 69 | Avoid a crash (double-free) when SSH connection fails |
int tls1_new(SSL *s)
{
if (!ssl3_new(s))
return 0;
if (!s->method->ssl_clear(s))
return 0;
return 1;
} | 0 | [
"CWE-476"
] | openssl | 5235ef44b93306a14d0b6c695b13c64b16e1fdec | 324,008,638,603,632,780,000,000,000,000,000,000,000 | 9 | Fix SSL_check_chain()
The function SSL_check_chain() can be used by applications to check that
a cert and chain is compatible with the negotiated parameters. This could
be useful (for example) from the certificate callback. Unfortunately this
function was applying TLSv1.2 sig algs rules and did not work correctly if
T... |
void __init check_bugs(void)
{
identify_boot_cpu();
/*
* identify_boot_cpu() initialized SMT support information, let the
* core code know.
*/
cpu_smt_check_topology();
if (!IS_ENABLED(CONFIG_SMP)) {
pr_info("CPU: ");
print_cpu_info(&boot_cpu_data);
}
/*
* Read the SPEC_CTRL MSR to account for rese... | 0 | [] | linux | a2059825986a1c8143fd6698774fa9d83733bb11 | 126,082,886,561,017,920,000,000,000,000,000,000,000 | 67 | x86/speculation: Enable Spectre v1 swapgs mitigations
The previous commit added macro calls in the entry code which mitigate the
Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are
enabled. Enable those features where applicable.
The mitigations may be disabled with "nospectre_v1" or "mitigations... |
void test_nghttp2_session_on_stream_close(void) {
nghttp2_session *session;
nghttp2_session_callbacks callbacks;
my_user_data user_data;
nghttp2_stream *stream;
memset(&callbacks, 0, sizeof(nghttp2_session_callbacks));
callbacks.on_stream_close_callback = on_stream_close_callback;
user_data.stream_close_... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 9,112,275,706,718,778,000,000,000,000,000,000,000 | 19 | Add nghttp2_option_set_max_outbound_ack |
SYSCALL_DEFINE4(rt_sigaction, int, sig,
const struct sigaction __user *, act,
struct sigaction __user *, oact,
size_t, sigsetsize)
{
struct k_sigaction new_sa, old_sa;
int ret = -EINVAL;
/* XXX: Don't preclude handling different sized sigset_t's. */
if (sigsetsize != sizeof(sigset_t))
goto out;
if (act)... | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 161,667,503,416,342,190,000,000,000,000,000,000,000 | 26 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
void SerializeNumberProperty(const std::string &key, size_t number, json &obj) {
JsonAddMember(obj, key.c_str(), json(static_cast<uint64_t>(number)));
} | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 9,380,168,918,562,604,000,000,000,000,000,000,000 | 3 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
update_t *update_New( vlc_object_t *p_this )
{
(void)p_this;
return NULL;
} | 0 | [
"CWE-120",
"CWE-787"
] | vlc | fbe2837bc80f155c001781041a54c58b5524fc14 | 138,941,103,136,434,420,000,000,000,000,000,000,000 | 5 | misc: update: fix buffer overflow in updater
On 32 bit builds, parsing of update status files with a size of
4294967295 or more lead to an integer truncation in a call to malloc
and a subsequent buffer overflow. This happened prior to checking the
files' signature. The commit fixes this by disallowing overly large
sta... |
PHP_FUNCTION(xsl_xsltprocessor_register_php_functions)
{
zval *id;
xsl_object *intern;
zval *array_value, **entry, *new_string;
int name_len = 0;
char *name;
DOM_GET_THIS(id);
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "a", &array_value) == SUCCESS) {
intern = (xsl_obj... | 0 | [] | php-src | 1744be2d17befc69bf00033993f4081852a747d6 | 279,323,029,513,571,800,000,000,000,000,000,000,000 | 40 | Fix for bug #69782 |
void binary_paths_manager::set_paths(const config& cfg)
{
cleanup();
init_binary_paths();
BOOST_FOREACH(const config &bp, cfg.child_range("binary_path"))
{
std::string path = bp["path"].str();
if (path.find("..") != std::string::npos) {
ERR_FS << "Invalid binary path '" << path << "'\n";
continue;
}
... | 0 | [
"CWE-200"
] | wesnoth | af61f9fdd15cd439da9e2fe5fa39d174c923eaae | 225,055,904,594,314,680,000,000,000,000,000,000,000 | 19 | fs: Use game data path to resolve ./ in the absence of a current_dir
Fixes a file content disclosure bug (#22042) affecting functionality
relying on the get_wml_location() function and not passing a non-empty
value for the current_dir parameter.
See <https://gna.org/bugs/?22042> for details.
This is a candidate for ... |
static inline bool tcp_sequence(const struct tcp_sock *tp, u32 seq, u32 end_seq)
{
return !before(end_seq, tp->rcv_wup) &&
!after(seq, tp->rcv_nxt + tcp_receive_window(tp));
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | 8b8a321ff72c785ed5e8b4cf6eda20b35d427390 | 17,747,172,951,447,788,000,000,000,000,000,000,000 | 5 | tcp: fix zero cwnd in tcp_cwnd_reduction
Patch 3759824da87b ("tcp: PRR uses CRB mode by default and SS mode
conditionally") introduced a bug that cwnd may become 0 when both
inflight and sndcnt are 0 (cwnd = inflight + sndcnt). This may lead
to a div-by-zero if the connection starts another cwnd reduction
phase by set... |
SdMmcCheckTrbEnv (
IN SD_MMC_HC_PRIVATE_DATA *Private,
IN SD_MMC_HC_TRB *Trb
)
{
EFI_STATUS Status;
EFI_SD_MMC_PASS_THRU_COMMAND_PACKET *Packet;
EFI_PCI_IO_PROTOCOL *PciIo;
UINT32 PresentState;
... | 0 | [] | edk2 | e36d5ac7d10a6ff5becb0f52fdfd69a1752b0d14 | 215,166,077,080,996,430,000,000,000,000,000,000,000 | 40 | MdeModulePkg/SdMmcPciHcDxe: Fix double PciIo Unmap in TRB creation (CVE-2019-14587)
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1989
The commit will avoid unmapping the same resource in error handling logic
for function BuildAdmaDescTable() and SdMmcCreateTrb().
For the error handling in BuildAdmaDescTable():... |
size_t HeaderMapImpl::removeInline(HeaderEntryImpl** ptr_to_entry) {
if (!*ptr_to_entry) {
return 0;
}
HeaderEntryImpl* entry = *ptr_to_entry;
const uint64_t size_to_subtract = entry->entry_->key().size() + entry->entry_->value().size();
subtractSize(size_to_subtract);
*ptr_to_entry = nullptr;
header... | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 146,309,694,155,249,770,000,000,000,000,000,000,000 | 12 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
static chclass classify(char c) {
switch (c) {
case ' ':
case '\t':
case '\r':
case '\n':
return WHITESPACE;
case '"':
return QUOTE;
case '[':
case ',':
case ']':
case '{':
case ':':
case '}':
return STRUCTURE;
default:
return LITERAL;
}
} | 0 | [
"CWE-119",
"CWE-787"
] | jq | 8eb1367ca44e772963e704a700ef72ae2e12babd | 331,464,376,104,638,700,000,000,000,000,000,000,000 | 20 | Heap buffer overflow in tokenadd() (fix #105)
This was an off-by one: the NUL terminator byte was not allocated on
resize. This was triggered by JSON-encoded numbers longer than 256
bytes. |
xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity) {
xmlParserInputPtr input;
if (entity == NULL) {
xmlErrInternal(ctxt, "xmlNewEntityInputStream entity = NULL\n",
NULL);
return(NULL);
}
if (xmlParserDebugEntities)
xmlGenericError(xmlGenericErrorContext,
"ne... | 0 | [
"CWE-119"
] | libxml2 | 23f05e0c33987d6605387b300c4be5da2120a7ab | 334,652,120,040,215,470,000,000,000,000,000,000,000 | 51 | Detect excessive entities expansion upon replacement
If entities expansion in the XML parser is asked for,
it is possble to craft relatively small input document leading
to excessive on-the-fly content generation.
This patch accounts for those replacement and stop parsing
after a given threshold. it can be bypassed as... |
png_colorspace_set_gamma(png_const_structrp png_ptr,
png_colorspacerp colorspace, png_fixed_point gAMA)
{
/* Changed in libpng-1.5.4 to limit the values to ensure overflow can't
* occur. Since the fixed point representation is asymetrical it is
* possible for 1/gamma to overflow the limit of 21474 and t... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 217,895,590,040,933,740,000,000,000,000,000,000,000 | 53 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
static void svm_prepare_guest_switch(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
struct svm_cpu_data *sd = per_cpu(svm_data, vcpu->cpu);
if (sev_es_guest(vcpu->kvm))
sev_es_unmap_ghcb(svm);
if (svm->guest_state_loaded)
return;
/*
* Save additional host state that will be restored on VMEX... | 0 | [
"CWE-862"
] | kvm | 0f923e07124df069ba68d8bb12324398f4b6b709 | 279,850,544,172,825,550,000,000,000,000,000,000,000 | 34 | KVM: nSVM: avoid picking up unsupported bits from L2 in int_ctl (CVE-2021-3653)
* Invert the mask of bits that we pick from L2 in
nested_vmcb02_prepare_control
* Invert and explicitly use VIRQ related bits bitmask in svm_clear_vintr
This fixes a security issue that allowed a malicious L1 to run L2 with
AVIC enable... |
void sha1_final(unsigned char *md, SHACTX c)
{
unsigned int mdlen = 0;
EVP_DigestFinal(c, md, &mdlen);
EVP_MD_CTX_destroy(c);
} | 0 | [
"CWE-476"
] | libssh | b36272eac1b36982598c10de7af0a501582de07a | 118,495,281,238,567,980,000,000,000,000,000,000,000 | 7 | CVE-2020-1730: Fix a possible segfault when zeroing AES-CTR key
Fixes T213
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> |
static void print_cifs_mount_version(void)
{
printf("mount.cifs version: %s.%s%s\n",
MOUNT_CIFS_VERSION_MAJOR,
MOUNT_CIFS_VERSION_MINOR,
MOUNT_CIFS_VENDOR_SUFFIX);
} | 0 | [
"CWE-59"
] | samba | 3ae5dac462c4ed0fb2cd94553583c56fce2f9d80 | 23,307,911,306,372,540,000,000,000,000,000,000,000 | 7 | mount.cifs: take extra care that mountpoint isn't changed during mount
It's possible to trick mount.cifs into mounting onto the wrong directory
by replacing the mountpoint with a symlink to a directory. mount.cifs
attempts to check the validity of the mountpoint, but there's still a
possible race between those checks ... |
ExecutionStatus JSObject::getComputedDescriptor(
Handle<JSObject> selfHandle,
Runtime *runtime,
Handle<> nameValHandle,
MutableHandle<JSObject> &propObj,
ComputedPropertyDescriptor &desc) {
auto converted = toPropertyKeyIfObject(runtime, nameValHandle);
if (LLVM_UNLIKELY(converted == ExecutionSt... | 0 | [
"CWE-843",
"CWE-125"
] | hermes | fe52854cdf6725c2eaa9e125995da76e6ceb27da | 44,737,016,146,784,570,000,000,000,000,000,000,000 | 13 | [CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain.
Summary:
The change in the hermes repository fixes the security vulnerability
CVE-2020-1911. This vulnerability only affects applications which
allow evaluation of uncontrolled, untrusted JavaScript code not
shipped wit... |
vmxnet3_pci_dma_write_rxcd(PCIDevice *pcidev, dma_addr_t pa,
struct Vmxnet3_RxCompDesc *rxcd)
{
rxcd->val1 = cpu_to_le32(rxcd->val1);
rxcd->val2 = cpu_to_le32(rxcd->val2);
rxcd->val3 = cpu_to_le32(rxcd->val3);
pci_dma_write(pcidev, pa, rxcd, sizeof(*rxcd));
} | 0 | [] | qemu | d05dcd94aee88728facafb993c7280547eb4d645 | 211,647,034,692,215,300,000,000,000,000,000,000,000 | 8 | net: vmxnet3: validate configuration values during activate (CVE-2021-20203)
While activating device in vmxnet3_acticate_device(), it does not
validate guest supplied configuration values against predefined
minimum - maximum limits. This may lead to integer overflow or
OOB access issues. Add checks to avoid it.
Fixes... |
static struct task_struct *find_alive_thread(struct task_struct *p)
{
struct task_struct *t;
for_each_thread(p, t) {
if (!(t->flags & PF_EXITING))
return t;
}
return NULL;
} | 0 | [
"CWE-200",
"CWE-284"
] | linux | 6c85501f2fabcfc4fc6ed976543d252c4eaf4be9 | 148,518,420,691,051,360,000,000,000,000,000,000,000 | 10 | fix infoleak in waitid(2)
kernel_waitid() can return a PID, an error or 0. rusage is filled in the first
case and waitid(2) rusage should've been copied out exactly in that case, *not*
whenever kernel_waitid() has not returned an error. Compat variant shares that
braino; none of kernel_wait4() callers do, so the bel... |
Chapters::~Chapters() {
while (chapters_count_ > 0) {
Chapter& chapter = chapters_[--chapters_count_];
chapter.Clear();
}
delete[] chapters_;
chapters_ = NULL;
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 248,904,306,875,757,620,000,000,000,000,000,000,000 | 9 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
bool peekList() {
return false;
} | 0 | [
"CWE-703",
"CWE-770"
] | fbthrift | 3f156207e8a6583d88999487e954320dc18955e6 | 182,086,683,701,921,140,000,000,000,000,000,000,000 | 3 | Better handling of truncated data when reading containers
Summary:
Currently we read the container size and blindly pre-allocate the container of that size. This allows malicious attacker to send few bytes message and cause server to allocate GBs of memory.
This diff changes the logic to check if we have at least 1b/... |
static int tls1_get_curvelist(SSL *s, int sess,
const unsigned char **pcurves,
size_t *num_curves)
{
size_t pcurveslen = 0;
if (sess) {
*pcurves = s->session->tlsext_ellipticcurvelist;
pcurveslen = s->session->tlsext_ellipticcurvelist_l... | 0 | [
"CWE-190"
] | openssl | a004e72b95835136d3f1ea90517f706c24c03da7 | 209,346,016,624,882,840,000,000,000,000,000,000,000 | 57 | Avoid some undefined pointer arithmetic
A common idiom in the codebase is:
if (p + len > limit)
{
return; /* Too long */
}
Where "p" points to some malloc'd data of SIZE bytes and
limit == p + SIZE
"len" here could be from some externally supplied data (e.g. from a TLS
message).
The rules of C pointer arithmet... |
void bnx2x_free_mem_cnic(struct bnx2x *bp)
{
bnx2x_ilt_mem_op_cnic(bp, ILT_MEMOP_FREE);
if (!CHIP_IS_E1x(bp))
BNX2X_PCI_FREE(bp->cnic_sb.e2_sb, bp->cnic_sb_mapping,
sizeof(struct host_hc_status_block_e2));
else
BNX2X_PCI_FREE(bp->cnic_sb.e1x_sb, bp->cnic_sb_mapping,
sizeof(struct host_hc_sta... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 36,110,410,879,325,106,000,000,000,000,000,000,000 | 13 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
static void on_write_complete(h2o_socket_t *sock, int status)
{
h2o_http2_conn_t *conn = sock->data;
assert(conn->_write.buf_in_flight != NULL);
/* close by error if necessary */
if (status != 0) {
close_connection_now(conn);
return;
}
/* reset the other memory pool */
h2o... | 0 | [
"CWE-703"
] | h2o | 1c0808d580da09fdec5a9a74ff09e103ea058dd4 | 278,547,763,405,715,150,000,000,000,000,000,000,000 | 53 | h2: use after free on premature connection close #920
lib/http2/connection.c:on_read() calls parse_input(), which might free
`conn`. It does so in particular if the connection preface isn't
the expected one in expect_preface(). `conn` is then used after the free
in `if (h2o_timeout_is_linked(&conn->_write.timeout_entr... |
static int mem_is_in_memp(int mem, int num, UChar* memp)
{
int i;
MemNumType m;
for (i = 0; i < num; i++) {
GET_MEMNUM_INC(m, memp);
if (mem == (int )m) return 1;
}
return 0;
} | 0 | [
"CWE-125"
] | oniguruma | 690313a061f7a4fa614ec5cc8368b4f2284e059b | 159,217,394,795,579,460,000,000,000,000,000,000,000 | 11 | fix #57 : DATA_ENSURE() check must be before data access |
BGD_DECLARE(gdImagePtr) gdImageCreateFromGd2PartCtx (gdIOCtx * in, int srcx, int srcy, int w, int h)
{
_noLibzError();
return NULL;
} | 0 | [
"CWE-703",
"CWE-189",
"CWE-681"
] | libgd | 2bb97f407c1145c850416a3bfbcc8cf124e68a19 | 230,936,790,404,357,400,000,000,000,000,000,000,000 | 5 | gd2: handle corrupt images better (CVE-2016-3074)
Make sure we do some range checking on corrupted chunks.
Thanks to Hans Jerry Illikainen <hji@dyntopia.com> for indepth report
and reproducer information. Made for easy test case writing :). |
void decoder_context::calc_tid_and_framerate_ratio()
{
int highestTID = get_highest_TID();
// if number of temporal layers changed, we have to recompute the framedrop table
if (framedrop_tab[100].tid != highestTID) {
compute_framedrop_table();
}
goal_HighestTid = framedrop_tab[framerate_ratio].t... | 0 | [
"CWE-416"
] | libde265 | f538254e4658ef5ea4e233c2185dcbfd165e8911 | 50,235,183,068,107,330,000,000,000,000,000,000,000 | 17 | fix streams where SPS image size changes without refreshing PPS (#299) |
int cluster_loop_check(struct cluster_list *cluster, struct in_addr originator)
{
int i;
for (i = 0; i < cluster->length / 4; i++)
if (cluster->list[i].s_addr == originator.s_addr)
return 1;
return 0;
} | 0 | [
"CWE-20",
"CWE-436"
] | frr | 943d595a018e69b550db08cccba1d0778a86705a | 172,594,578,098,030,470,000,000,000,000,000,000,000 | 9 | bgpd: don't use BGP_ATTR_VNC(255) unless ENABLE_BGP_VNC_ATTR is defined
Signed-off-by: Lou Berger <lberger@labn.net> |
gather_faked( void (*add)(const void*, size_t, int), int requester,
size_t length, int level )
{
static int initialized=0;
size_t n;
char *buffer, *p;
if( !initialized ) {
log_info(_("WARNING: using insecure random number generator!!\n"));
tty_printf(_("The random number generator is only a kl... | 0 | [
"CWE-200"
] | gnupg | c6dbfe89903d0c8191cf50ecf1abb3c8458b427a | 175,858,929,325,525,530,000,000,000,000,000,000,000 | 33 | random: Hash continuous areas in the csprng pool.
* cipher/random.c (mix_pool): Store the first hash at the end of the
pool.
--
This fixes a long standing bug (since 1998) in Libgcrypt and GnuPG.
An attacker who obtains 580 bytes of the random number from the
standard RNG can trivially predict the next 20 bytes of ou... |
__execlists_update_reg_state(const struct intel_context *ce,
const struct intel_engine_cs *engine)
{
struct intel_ring *ring = ce->ring;
u32 *regs = ce->lrc_reg_state;
GEM_BUG_ON(!intel_ring_offset_valid(ring, ring->head));
GEM_BUG_ON(!intel_ring_offset_valid(ring, ring->tail));
regs[CTX_RING_BUFFER_STAR... | 0 | [] | linux | bc8a76a152c5f9ef3b48104154a65a68a8b76946 | 306,383,422,250,990,400,000,000,000,000,000,000,000 | 21 | drm/i915/gen9: Clear residual context state on context switch
Intel ID: PSIRT-TA-201910-001
CVEID: CVE-2019-14615
Intel GPU Hardware prior to Gen11 does not clear EU state
during a context switch. This can result in information
leakage between contexts.
For Gen8 and Gen9, hardware provides a mechanism for
fast clear... |
static struct object_entry *find_object(unsigned char *sha1)
{
unsigned int h = sha1[0] << 8 | sha1[1];
struct object_entry *e;
for (e = object_table[h]; e; e = e->next)
if (!hashcmp(sha1, e->idx.sha1))
return e;
return NULL;
} | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 18,224,859,789,744,431,000,000,000,000,000,000,000 | 9 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
main(int argc, char *argv[])
{
char pidstr[16];
ssize_t ret;
int c, log_method;
char *logfile, *pidfile;
int facility, fd;
char *username = NULL;
char *chrootdir = NULL;
int configtest = 0;
int singleprocess = 0;
#ifdef HAVE_GETOPT_LONG
int opt_idx;
#endif
pname = ((pname=strrchr(argv[0],'/')) != NULL)?pnam... | 1 | [
"CWE-20"
] | radvd | 7dc53cc3b792775369bf0b2f053a3f4ed5d87e3d | 28,963,992,092,035,403,000,000,000,000,000,000,000 | 261 | Really exit on privsep init failure. |
static void virtfs_reset(V9fsPDU *pdu)
{
V9fsState *s = pdu->s;
V9fsFidState *fidp = NULL;
/* Free all fids */
while (s->fid_list) {
fidp = s->fid_list;
s->fid_list = fidp->next;
if (fidp->ref) {
fidp->clunked = 1;
} else {
free_fid(pdu, fidp);
... | 0 | [
"CWE-399",
"CWE-772"
] | qemu | e95c9a493a5a8d6f969e86c9f19f80ffe6587e19 | 45,905,224,574,883,790,000,000,000,000,000,000,000 | 22 | 9pfs: fix potential host memory leak in v9fs_read
In 9pfs read dispatch function, it doesn't free two QEMUIOVector
object thus causing potential memory leak. This patch avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Greg Kurz <groug@kaod.org> |
const CuePoint* Cues::GetNext(const CuePoint* pCurr) const {
if (pCurr == NULL || pCurr->GetTimeCode() < 0 || m_cue_points == NULL ||
m_count < 1) {
return NULL;
}
long index = pCurr->m_index;
if (index >= m_count)
return NULL;
CuePoint* const* const pp = m_cue_points;
if (pp == NULL || pp[i... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 216,109,468,379,585,200,000,000,000,000,000,000,000 | 26 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
virDomainControllerSCSINextUnit(const virDomainDef *def,
unsigned int max_unit,
unsigned int controller)
{
size_t i;
for (i = 0; i < max_unit; i++) {
/* Default to assigning addresses using bus = target = 0 */
const virDomainDevice... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 280,956,699,063,389,240,000,000,000,000,000,000,000 | 16 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
static uint8_t dynamic_range_info(bitfile *ld, drc_info *drc)
{
uint8_t i, n = 1;
uint8_t band_incr;
drc->num_bands = 1;
if (faad_get1bit(ld
DEBUGVAR(1,90,"dynamic_range_info(): has instance_tag")) & 1)
{
drc->pce_instance_tag = (uint8_t)faad_getbits(ld, 4
DEBUGVAR(1,91... | 0 | [
"CWE-119",
"CWE-787"
] | faad2 | 942c3e0aee748ea6fe97cb2c1aa5893225316174 | 330,219,813,096,525,920,000,000,000,000,000,000,000 | 63 | Fix a couple buffer overflows
https://hackerone.com/reports/502816
https://hackerone.com/reports/507858
https://github.com/videolan/vlc/blob/master/contrib/src/faad2/faad2-fix-overflows.patch |
mISDN_sock_sendmsg(struct kiocb *iocb, struct socket *sock,
struct msghdr *msg, size_t len)
{
struct sock *sk = sock->sk;
struct sk_buff *skb;
int err = -ENOMEM;
struct sockaddr_mISDN *maddr;
if (*debug & DEBUG_SOCKET)
printk(KERN_DEBUG "%s: len %d flags %x ch %d proto %x\n",
__func__, (int)le... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 26,981,335,955,150,964,000,000,000,000,000,000,000 | 70 | 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... |
static sljit_uw * allocate_read_only_data(compiler_common *common, sljit_uw size)
{
DEFINE_COMPILER;
sljit_uw *result;
if (SLJIT_UNLIKELY(sljit_get_compiler_error(compiler)))
return NULL;
result = (sljit_uw *)SLJIT_MALLOC(size + sizeof(sljit_uw), compiler->allocator_data);
if (SLJIT_UNLIKELY(result == NULL))
{
... | 0 | [
"CWE-125"
] | php-src | 8947fd9e9fdce87cd6c59817b1db58e789538fe9 | 176,451,022,081,145,600,000,000,000,000,000,000,000 | 19 | Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2. |
draw_image_boxes (void *_dst,
cairo_image_surface_t *image,
cairo_boxes_t *boxes,
int dx, int dy)
{
cairo_image_surface_t *dst = _dst;
struct _cairo_boxes_chunk *chunk;
int i;
TRACE ((stderr, "%s x %d\n", __FUNCTION__, boxes->num_boxes));
for (chunk = &boxes->chunks; chunk; chunk = chu... | 0 | [
"CWE-787"
] | cairo | c986a7310bb06582b7d8a566d5f007ba4e5e75bf | 179,305,521,743,482,330,000,000,000,000,000,000,000 | 39 | image: Enable inplace compositing with opacities for general routines
On a SNB i5-2500:
Speedups
========
firefox-chalkboard 34284.16 -> 19637.40: 1.74x speedup
swfdec-giant-steps 778.35 -> 665.37: 1.17x speedup
ocitysmap 485.64 -> 431.94: 1.12x speedup
Slowdowns
===... |
static unsigned iowarrior_poll(struct file *file, poll_table * wait)
{
struct iowarrior *dev = file->private_data;
unsigned int mask = 0;
if (!dev->present)
return POLLERR | POLLHUP;
poll_wait(file, &dev->read_wait, wait);
poll_wait(file, &dev->write_wait, wait);
if (!dev->present)
return POLLERR | POLLHUP... | 0 | [
"CWE-703"
] | linux | 4ec0ef3a82125efc36173062a50624550a900ae0 | 172,107,718,607,000,600,000,000,000,000,000,000,000 | 21 | USB: iowarrior: fix oops with malicious USB descriptors
The iowarrior driver expects at least one valid endpoint. If given
malicious descriptors that specify 0 for the number of endpoints,
it will crash in the probe function. Ensure there is at least
one endpoint on the interface before using it.
The full report of... |
menu_item_deselect_cb (GtkMenuItem *proxy,
FrWindow *window)
{
gtk_statusbar_pop (GTK_STATUSBAR (window->priv->statusbar),
window->priv->help_message_cid);
} | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 330,191,462,444,932,600,000,000,000,000,000,000,000 | 6 | libarchive: sanitize filenames before extracting |
static void set_empty_dir(struct ctl_dir *dir)
{
dir->header.ctl_table[0].child = sysctl_mount_point;
} | 0 | [
"CWE-20",
"CWE-399"
] | linux | 93362fa47fe98b62e4a34ab408c4a418432e7939 | 312,592,619,591,226,560,000,000,000,000,000,000,000 | 4 | sysctl: Drop reference added by grab_header in proc_sys_readdir
Fixes CVE-2016-9191, proc_sys_readdir doesn't drop reference
added by grab_header when return from !dir_emit_dots path.
It can cause any path called unregister_sysctl_table will
wait forever.
The calltrace of CVE-2016-9191:
[ 5535.960522] Call Trace:
[ ... |
set_empty_repeat_node_trav(Node* node, Node* empty, ScanEnv* env)
{
int r;
switch (NODE_TYPE(node)) {
case NODE_LIST:
case NODE_ALT:
do {
r = set_empty_repeat_node_trav(NODE_CAR(node), empty, env);
} while (r == 0 && IS_NOT_NULL(node = NODE_CDR(node)));
break;
case NODE_ANCHOR:
{
... | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 114,827,860,653,390,100,000,000,000,000,000,000,000 | 76 | #207: Out-of-bounds write |
static inline int __tcp_mtu_to_mss(struct sock *sk, int pmtu)
{
const struct tcp_sock *tp = tcp_sk(sk);
const struct inet_connection_sock *icsk = inet_csk(sk);
int mss_now;
/* Calculate base mss without TCP options:
It is MMS_S - sizeof(tcphdr) of rfc1122
*/
mss_now = pmtu - icsk->icsk_af_ops->net_header_le... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 26,908,993,657,246,074,000,000,000,000,000,000,000 | 31 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
static char *
process_substitute (string, open_for_read_in_child)
char *string;
int open_for_read_in_child;
{
char *pathname;
int fd, result;
pid_t old_pid, pid;
#if defined (HAVE_DEV_FD)
int parent_pipe_fd, child_pipe_fd;
int fildes[2];
#endif /* HAVE_DEV_FD */
#if defined (JOB_CONTROL)
pid_t old... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 125,122,194,660,909,200,000,000,000,000,000,000,000 | 198 | Bash-4.4 patch 7 |
long fuse_do_ioctl(struct file *file, unsigned int cmd, unsigned long arg,
unsigned int flags)
{
struct fuse_file *ff = file->private_data;
struct fuse_conn *fc = ff->fc;
struct fuse_ioctl_in inarg = {
.fh = ff->fh,
.cmd = cmd,
.arg = arg,
.flags = flags
};
struct fuse_ioctl_out outarg;
struct fuse_r... | 0 | [] | linux-2.6 | 0bd87182d3ab18a32a8e9175d3f68754c58e3432 | 165,634,786,200,926,800,000,000,000,000,000,000,000 | 166 | fuse: fix kunmap in fuse_ioctl_copy_user
Looks like another victim of the confusing kmap() vs kmap_atomic() API
differences.
Reported-by: Todor Gyumyushev <yodor1@gmail.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Cc: Tejun Heo <tj@kernel.org>
Cc: stable@kern... |
void pstrcpy_targphys(const char *name, hwaddr dest, int buf_size,
const char *source)
{
const char *nulp;
char *ptr;
if (buf_size <= 0) return;
nulp = memchr(source, 0, buf_size);
if (nulp) {
rom_add_blob_fixed(name, source, (nulp - source) + 1, dest);
} else {
... | 0 | [
"CWE-787"
] | qemu | e423455c4f23a1a828901c78fe6d03b7dde79319 | 128,352,127,472,527,640,000,000,000,000,000,000,000 | 16 | hw/core/loader: Fix possible crash in rom_copy()
Both, "rom->addr" and "addr" are derived from the binary image
that can be loaded with the "-kernel" paramer. The code in
rom_copy() then calculates:
d = dest + (rom->addr - addr);
and uses "d" as destination in a memcpy() some lines later. Now with
bad kernel ima... |
QPDFFormFieldObjectHelper::setV(
QPDFObjectHandle value, bool need_appearances)
{
if (getFieldType() == "/Btn")
{
if (isCheckbox())
{
bool okay = false;
if (value.isName())
{
std::string name = value.getName();
if ((name == ... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 300,739,551,092,904,430,000,000,000,000,000,000,000 | 66 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
int handleClientsWithPendingWrites(void) {
listIter li;
listNode *ln;
int processed = listLength(server.clients_pending_write);
listRewind(server.clients_pending_write,&li);
while((ln = listNext(&li))) {
client *c = listNodeValue(ln);
c->flags &= ~CLIENT_PENDING_WRITE;
listD... | 0 | [
"CWE-254"
] | redis | 874804da0c014a7d704b3d285aa500098a931f50 | 274,869,982,575,224,400,000,000,000,000,000,000,000 | 25 | Security: Cross Protocol Scripting protection.
This is an attempt at mitigating problems due to cross protocol
scripting, an attack targeting services using line oriented protocols
like Redis that can accept HTTP requests as valid protocol, by
discarding the invalid parts and accepting the payloads sent, for
example, ... |
static void l2tp_eth_adjust_mtu(struct l2tp_tunnel *tunnel,
struct l2tp_session *session,
struct net_device *dev)
{
unsigned int overhead = 0;
struct dst_entry *dst;
u32 l3_overhead = 0;
/* if the encap is UDP, account for UDP header size */
if (tunnel->encap == L2TP_ENCAPTYPE_UDP) {
overhead += sizeof(... | 0 | [
"CWE-416"
] | linux | f026bc29a8e093edfbb2a77700454b285c97e8ad | 306,453,757,700,123,130,000,000,000,000,000,000,000 | 48 | l2tp: pass tunnel pointer to ->session_create()
Using l2tp_tunnel_find() in pppol2tp_session_create() and
l2tp_eth_create() is racy, because no reference is held on the
returned session. These functions are only used to implement the
->session_create callback which is run by l2tp_nl_cmd_session_create().
Therefore sea... |
magic_file(struct magic_set *ms, const char *inname)
{
if (ms == NULL)
return NULL;
return file_or_fd(ms, inname, STDIN_FILENO);
} | 0 | [
"CWE-399"
] | file | 90018fe22ff8b74a22fcd142225b0a00f3f12677 | 72,559,021,029,910,810,000,000,000,000,000,000,000 | 6 | bump recursion to 15, and allow it to be set from the command line. |
PHP_MSHUTDOWN_FUNCTION(radius)
{
return SUCCESS;
} | 0 | [
"CWE-119",
"CWE-787"
] | php-radius | 13c149b051f82b709e8d7cc32111e84b49d57234 | 1,568,228,176,858,501,000,000,000,000,000,000,000 | 4 | Fix a security issue in radius_get_vendor_attr().
The underlying rad_get_vendor_attr() function assumed that it would always be
given valid VSA data. Indeed, the buffer length wasn't even passed in; the
assumption was that the length field within the VSA structure would be valid.
This could result in denial of servic... |
char* oidc_util_get_chunked_cookie(request_rec *r, const char *cookieName,
int chunkSize) {
char *cookieValue = NULL;
char *chunkValue = NULL;
int i = 0;
if (chunkSize == 0) {
cookieValue = oidc_util_get_cookie(r, cookieName);
} else {
int chunkCount = oidc_util_get_chunked_count(r, cookieName);
if (chunkC... | 0 | [
"CWE-79"
] | mod_auth_openidc | 55ea0a085290cd2c8cdfdd960a230cbc38ba8b56 | 122,228,836,650,330,670,000,000,000,000,000,000,000 | 24 | Add a function to escape Javascript characters |
static inline int remap_pud_range(struct mm_struct *mm, pgd_t *pgd,
unsigned long addr, unsigned long end,
unsigned long pfn, pgprot_t prot)
{
pud_t *pud;
unsigned long next;
pfn -= addr >> PAGE_SHIFT;
pud = pud_alloc(mm, pgd, addr);
if (!pud)
return -ENOMEM;
do {
next = pud_addr_end(addr, end);
if (... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 4,739,920,457,681,938,500,000,000,000,000,000,000 | 19 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
int meth_put(struct transaction_t *txn, void *params)
{
struct meth_params *pparams = (struct meth_params *) params;
int ret, r, precond, rights, reqd_rights;
const char **hdr, *etag;
struct mime_type_t *mime = NULL;
struct mailbox *mailbox = NULL;
struct dav_data *ddata;
struct index_record... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 180,014,933,234,705,300,000,000,000,000,000,000,000 | 257 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
struct sock *inet_csk_clone(struct sock *sk, const struct request_sock *req,
const gfp_t priority)
{
struct sock *newsk = sk_clone(sk, priority);
if (newsk != NULL) {
struct inet_connection_sock *newicsk = inet_csk(newsk);
newsk->sk_state = TCP_SYN_RECV;
newicsk->icsk_bind_hash = NULL;
inet_sk(newsk... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 138,974,600,894,518,780,000,000,000,000,000,000,000 | 27 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
bool yang_dnode_get_bool(const struct lyd_node *dnode, const char *xpath_fmt,
...)
{
const struct lyd_value *dvalue;
dvalue = YANG_DNODE_XPATH_GET_VALUE(dnode, xpath_fmt);
assert(dvalue->realtype->basetype == LY_TYPE_BOOL);
return dvalue->boolean;
} | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 188,518,980,052,000,200,000,000,000,000,000,000,000 | 8 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
tput_cmd(int fd, TTY * saved_settings, bool opt_x, int argc, char *argv[])
{
NCURSES_CONST char *name;
char *s;
int status;
#if !PURE_TERMINFO
bool termcap = FALSE;
#endif
name = check_aliases(argv[0], FALSE);
if (is_reset || is_init) {
TTY oldmode;
int terasechar = -1; /* new erase characte... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 19,924,761,945,935,012,000,000,000,000,000,000,000 | 148 | 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 smb_vfs_call_lremovexattr(struct vfs_handle_struct *handle,
const char *path, const char *name)
{
VFS_FIND(lremovexattr);
return handle->fns->lremovexattr(handle, path, name);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 87,708,738,603,449,620,000,000,000,000,000,000,000 | 6 | 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... |
static BOOL optimize_class(compiler_common *common, const sljit_u8 *bits, BOOL nclass, BOOL invert, jump_list **backtracks)
{
/* May destroy TMP1. */
if (optimize_class_ranges(common, bits, nclass, invert, backtracks))
return TRUE;
return optimize_class_chars(common, bits, nclass, invert, backtracks);
} | 0 | [
"CWE-125"
] | php-src | 8947fd9e9fdce87cd6c59817b1db58e789538fe9 | 87,129,441,174,254,200,000,000,000,000,000,000,000 | 7 | Fix #78338: Array cross-border reading in PCRE
We backport r1092 from pcre2. |
static void set_cpu_partial(struct kmem_cache *s)
{
#ifdef CONFIG_SLUB_CPU_PARTIAL
/*
* cpu_partial determined the maximum number of objects kept in the
* per cpu partial lists of a processor.
*
* Per cpu partial lists mainly contain slabs that just have one
* object freed. If they are used for allocation th... | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 280,402,884,762,009,250,000,000,000,000,000,000,000 | 32 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack,
const char *dir)
{
OPENSSL_DIR_CTX *d = NULL;
const char *filename;
int ret = 0;
CRYPTO_w_lock(CRYPTO_LOCK_READDIR);
/* Note that a side effect is that the CAs will be sorted by name */
while((filename = OPENSSL_DIR_read(&d, dir)))
... | 0 | [] | openssl | c70a1fee71119a9005b1f304a3bf47694b4a53ac | 23,814,323,117,055,840,000,000,000,000,000,000,000 | 48 | Reorganise supported signature algorithm extension processing.
Only store encoded versions of peer and configured signature algorithms.
Determine shared signature algorithms and cache the result along with NID
equivalents of each algorithm.
(backport from HEAD) |
static int replace_user_table(THD *thd, TABLE *table, LEX_USER *combo,
ulong rights, bool revoke_grant,
bool can_create_user, bool no_auto_create)
{
int error = -1;
bool old_row_exists=0;
char *password= empty_c_string;
uint password_len= 0;
char what= (revoke_grant) ? 'N' : 'Y';
uchar use... | 0 | [] | mysql-server | 475dcde2c7856dd0050b967099a86c087d94f32f | 300,461,389,305,644,140,000,000,000,000,000,000,000 | 536 | Bug#27099029: UNLIMITED LENGTH OF THE PASSWORD
Description: my_crypt_genhash depends on the length of
plaintext password. Longer the password,
more is the time required to produce the
transformation. An unusually large password
may consume considerable amount of time... |
test_bson_append_double (void)
{
bson_t *b;
bson_t *b2;
b = bson_new ();
BSON_ASSERT (bson_append_double (b, "double", -1, 123.4567));
b2 = get_bson ("test20.bson");
BSON_ASSERT_BSON_EQUAL (b, b2);
bson_destroy (b);
bson_destroy (b2);
} | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 197,838,009,501,856,100,000,000,000,000,000,000,000 | 12 | CDRIVER-2269 Check for zero string length in codewscope |
LIEF::Binary::symbols_t Binary::get_abstract_symbols() {
LIEF::Binary::symbols_t syms;
syms.reserve(symbols_.size());
std::transform(std::begin(symbols_), std::end(symbols_),
std::back_inserter(syms),
[] (const std::unique_ptr<Symbol>& s) {
return s.get();
... | 0 | [
"CWE-703"
] | LIEF | 7acf0bc4224081d4f425fcc8b2e361b95291d878 | 332,498,140,843,234,440,000,000,000,000,000,000,000 | 10 | Resolve #764 |
flush_buf(tor_socket_t s, buf_t *buf, size_t sz, size_t *buf_flushlen)
{
/* XXXX024 It's stupid to overload the return values for these functions:
* "error status" and "number of bytes flushed" are not mutually exclusive.
*/
int r;
size_t flushed = 0;
tor_assert(buf_flushlen);
tor_assert(SOCKET_OK(s));
... | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 234,142,781,159,331,360,000,000,000,000,000,000,000 | 33 | Log malformed hostnames in socks5 request respecting SafeLogging |
void wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
{
unsigned long flags;
struct rq *rq;
int cpu __maybe_unused = get_cpu();
#ifdef CONFIG_SMP
rq = task_rq_lock(p, &flags);
p->state = TASK_WAKING;
/*
* Fork balancing, do it here and not earlier because:
* - cpus_allowed can change in t... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 72,733,682,398,779,310,000,000,000,000,000,000,000 | 36 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
static int do_token_in(USBDevice *dev, USBPacket *p)
{
USBHostDevice *s = (USBHostDevice *) dev;
int ret = 0;
if (p->devep != 0)
return usb_host_handle_data(s, p);
switch(s->ctrl.state) {
case CTRL_STATE_ACK:
if (!(s->ctrl.req.bRequestType & USB_DIR_IN)) {
ret = usb_hos... | 0 | [
"CWE-119"
] | qemu | babd03fde68093482528010a5435c14ce9128e3f | 274,624,244,059,630,900,000,000,000,000,000,000,000 | 40 | usb-linux.c: fix buffer overflow
In usb-linux.c:usb_host_handle_control, we pass a 1024-byte buffer and
length to the kernel. However, the length was provided by the caller
of dev->handle_packet, and is not checked, so the kernel might provide
too much data and overflow our buffer.
For example, hw/usb-uhci.c could s... |
Replaceable::~Replaceable() {} | 0 | [
"CWE-190",
"CWE-787"
] | icu | b7d08bc04a4296982fcef8b6b8a354a9e4e7afca | 166,759,741,616,159,350,000,000,000,000,000,000,000 | 1 | ICU-20958 Prevent SEGV_MAPERR in append
See #971 |
static int reencrypt_assign_segments_simple(struct crypt_device *cd,
struct luks2_hdr *hdr,
struct luks2_reencrypt *rh,
unsigned hot,
unsigned commit)
{
int r, sg;
if (hot && json_segments_count(rh->jobj_segs_hot) > 0) {
log_dbg(cd, "Setting 'hot' segments.");
r = LUKS2_segments_set(cd, hdr, rh->jobj_segs_h... | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 248,196,128,394,865,700,000,000,000,000,000,000,000 | 57 | Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack
Fix possible attacks against data confidentiality through LUKS2 online
reencryption extension crash recovery.
An attacker can modify on-disk metadata to simulate decryption in
progress with crashed (unfinished) reencryption step and persistently
decrypt par... |
void operator()(double& d) const { // NO-OP
} | 0 | [
"CWE-77",
"CWE-295"
] | osquery | c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c | 222,005,461,280,700,170,000,000,000,000,000,000,000 | 2 | Merge pull request from GHSA-4g56-2482-x7q8
* Proposed fix for attach tables vulnerability
* Add authorizer to ATC tables and cleanups
- Add unit test for authorizer function |
static int clie_5_attach(struct usb_serial *serial)
{
struct usb_serial_port *port;
unsigned int pipe;
int j;
/* TH55 registers 2 ports.
Communication in from the UX50/TH55 uses bulk_in_endpointAddress
from port 0. Communication out to the UX50/TH55 uses
bulk_out_endpointAddress from port 1
Lets d... | 1 | [
"CWE-703"
] | linux | cb3232138e37129e88240a98a1d2aba2187ff57c | 75,056,051,718,397,330,000,000,000,000,000,000,000 | 29 | USB: serial: visor: fix crash on detecting device without write_urbs
The visor driver crashes in clie_5_attach() when a specially crafted USB
device without bulk-out endpoint is detected. This fix adds a check that
the device has proper configuration expected by the driver.
Reported-by: Ralf Spenneberg <ralf@spennebe... |
static NTSTATUS pdb_samba_dsdb_update_group_mapping_entry(struct pdb_methods *m,
GROUP_MAP *map)
{
return NT_STATUS_NOT_IMPLEMENTED;
} | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 250,934,974,492,523,730,000,000,000,000,000,000,000 | 5 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.