func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
R_API int r_anal_var_get_argnum(RAnalVar *var) {
r_return_val_if_fail (var, -1);
RAnal *anal = var->fcn->anal;
if (!var->isarg || var->kind != R_ANAL_VAR_KIND_REG) { // TODO: support bp and sp too
return -1;
}
if (!var->regname) {
return -1;
}
RRegItem *reg = r_reg_get (anal->reg, var->regname, -1);
if (!re... | 0 | [
"CWE-416"
] | radare2 | a7ce29647fcb38386d7439696375e16e093d6acb | 60,747,898,069,283,690,000,000,000,000,000,000,000 | 23 | Fix UAF in aaaa on arm/thumb switching ##crash
* Reported by @peacock-doris via huntr.dev
* Reproducer tests_65185
* This is a logic fix, but not the fully safe as changes in the code
can result on UAF again, to properly protect r2 from crashing we
need to break the ABI and add refcounting to RRegItem, which can't... |
BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
{
int i;
BIO *out = NULL, *btmp = NULL;
X509_ALGOR *xa = NULL;
const EVP_CIPHER *evp_cipher = NULL;
STACK_OF(X509_ALGOR) *md_sk = NULL;
STACK_OF(PKCS7_RECIP_INFO) *rsk = NULL;
X509_ALGOR *xalg = NULL;
PKCS7_RECIP_INFO *ri = NULL;
ASN1_OCTET_ST... | 0 | [
"CWE-327"
] | openssl | e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f | 252,746,325,708,915,060,000,000,000,000,000,000,000 | 154 | Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey
An attack is simple, if the first CMS_recipientInfo is valid but the
second CMS_recipientInfo is chosen ciphertext. If the second
recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct
encryption key will be replaced by garbage, and the mess... |
static void stack_init (lua_State *L1, lua_State *L) {
int i; CallInfo *ci;
/* initialize stack array */
L1->stack = luaM_newvector(L, BASIC_STACK_SIZE, StackValue);
L1->stacksize = BASIC_STACK_SIZE;
for (i = 0; i < BASIC_STACK_SIZE; i++)
setnilvalue(s2v(L1->stack + i)); /* erase new stack */
L1->top =... | 0 | [
"CWE-703"
] | lua | a2195644d89812e5b157ce7bac35543e06db05e3 | 41,986,554,005,736,423,000,000,000,000,000,000,000 | 21 | Fixed bug: invalid 'oldpc' when returning to a function
The field 'L->oldpc' is not always updated when control returns to a
function; an invalid value can seg. fault when computing 'changedline'.
(One example is an error in a finalizer; control can return to
'luaV_execute' without executing 'luaD_poscall'.) Instead o... |
eventRow(TScreen *screen, XEvent *event) /* must be XButtonEvent */
{
return (event->xbutton.y - screen->border) / FontHeight(screen);
} | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 129,365,543,905,197,630,000,000,000,000,000,000,000 | 4 | snapshot of project "xterm", label xterm-365d |
send_setup_for_user (GdmSession *self,
const char *service_name)
{
const char *display_name;
const char *display_device;
const char *display_seat_id;
const char *display_hostname;
const char *display_x11_authority_file;
const char ... | 0 | [] | gdm | 05e5fc24b0f803098c1d05dae86f5eb05bd0c2a4 | 134,594,541,948,121,320,000,000,000,000,000,000,000 | 64 | session: Cancel worker proxy async ops when freeing conversations
We need to cancel ongoing async ops for worker proxies when freeing
conversations or we'll crash when the completion handler runs and we
access free'd memory.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
void cpu_check_watchpoint(CPUState *cpu, vaddr addr, vaddr len,
MemTxAttrs attrs, int flags, uintptr_t ra)
{
CPUClass *cc = CPU_GET_CLASS(cpu);
CPUWatchpoint *wp;
assert(tcg_enabled());
if (cpu->watchpoint_hit) {
/*
* We re-entered the check after replacing th... | 0 | [
"CWE-787"
] | qemu | 4bfb024bc76973d40a359476dc0291f46e435442 | 149,898,160,488,511,200,000,000,000,000,000,000,000 | 67 | memory: clamp cached translation in case it points to an MMIO region
In using the address_space_translate_internal API, address_space_cache_init
forgot one piece of advice that can be found in the code for
address_space_translate_internal:
/* MMIO registers can be expected to perform full-width accesses based onl... |
int install_session_keyring_to_cred(struct cred *cred, struct key *keyring)
{
unsigned long flags;
struct key *old;
might_sleep();
/* create an empty session keyring */
if (!keyring) {
flags = KEY_ALLOC_QUOTA_OVERRUN;
if (cred->session_keyring)
flags = KEY_ALLOC_IN_QUOTA;
keyring = keyring_alloc("_ses"... | 0 | [
"CWE-399",
"CWE-404"
] | linux | c9f838d104fed6f2f61d68164712e3204bf5271b | 233,060,584,566,308,740,000,000,000,000,000,000,000 | 31 | KEYS: fix keyctl_set_reqkey_keyring() to not leak thread keyrings
This fixes CVE-2017-7472.
Running the following program as an unprivileged user exhausts kernel
memory by leaking thread keyrings:
#include <keyutils.h>
int main()
{
for (;;)
keyctl_set_reqkey_keyring(KEY_REQKEY_DEFL_THREAD_KEYRING);
}
Fix ... |
bool Item_subselect::set_fake_select_as_master_processor(void *arg)
{
SELECT_LEX *fake_select= (SELECT_LEX*) arg;
/*
Move the st_select_lex_unit of a subquery from a global ORDER BY clause to
become a direct child of the fake_select of a UNION. In this way the
ORDER BY that is applied to the temporary t... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 269,656,638,156,109,940,000,000,000,000,000,000,000 | 31 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
static int update_clone(int argc, const char **argv, const char *prefix)
{
const char *update = NULL;
int max_jobs = -1;
struct string_list_item *item;
struct pathspec pathspec;
struct submodule_update_clone suc = SUBMODULE_UPDATE_CLONE_INIT;
struct option module_update_clone_options[] = {
OPT_STRING(0, "prefi... | 0 | [] | git | a8dee3ca610f5a1d403634492136c887f83b59d2 | 325,185,883,865,029,340,000,000,000,000,000,000,000 | 84 | Disallow dubiously-nested submodule git directories
Currently it is technically possible to let a submodule's git
directory point right into the git dir of a sibling submodule.
Example: the git directories of two submodules with the names `hippo`
and `hippo/hooks` would be `.git/modules/hippo/` and
`.git/modules/hipp... |
int32_t ptirq_add_intx_remapping(struct acrn_vm *vm, uint32_t virt_gsi, uint32_t phys_gsi, bool pic_pin)
{
struct ptirq_remapping_info *entry;
enum intx_ctlr vgsi_ctlr = pic_pin ? INTX_CTLR_PIC : INTX_CTLR_IOAPIC;
spinlock_obtain(&ptdev_lock);
entry = add_intx_remapping(vm, virt_gsi, phys_gsi, vgsi_ctlr);
spinloc... | 0 | [
"CWE-120",
"CWE-787"
] | acrn-hypervisor | 25c0e3817eb332660dd63d1d4522e63dcc94e79a | 109,419,949,544,383,000,000,000,000,000,000,000,000 | 11 | hv: validate input for dmar_free_irte function
Malicious input 'index' may trigger buffer
overflow on array 'irte_alloc_bitmap[]'.
This patch validate that 'index' shall be
less than 'CONFIG_MAX_IR_ENTRIES' and also
remove unnecessary check on 'index' in
'ptirq_free_irte()' function with this fix.
Tracked-On: ... |
dissect_kafka_fetch_request_partition(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
proto_item *ti;
proto_tree *subtree;
kafka_packet_values_t packet_values;
memset(&packet_values, 0, sizeof(packet_values));
... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 152,776,435,308,932,920,000,000,000,000,000,000,000 | 32 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
void CSteamNetworkConnectionBase::SNP_SentNonDataPacket( CConnectionTransport *pTransport, SteamNetworkingMicroseconds usecNow )
{
std::pair<int64,SNPInFlightPacket_t> pairInsert( m_statsEndToEnd.m_nNextSendSequenceNumber-1, SNPInFlightPacket_t{ usecNow, false, pTransport, {} } );
auto pairInsertResult = m_senderStat... | 0 | [
"CWE-787"
] | GameNetworkingSockets | e0c86dcb9139771db3db0cfdb1fb8bef0af19c43 | 112,824,168,794,578,360,000,000,000,000,000,000,000 | 6 | Drop unreliable segments with weird offset/size.
And be more deliberate about limits of unreliable message/segment sizes. |
static int ZEND_FASTCALL ZEND_FETCH_DIM_RW_SPEC_VAR_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
zval *dim = _get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC);
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 287,655,049,394,399,600,000,000,000,000,000,000,000 | 23 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
int ext4_ext_calc_metadata_amount(struct inode *inode, ext4_lblk_t lblock)
{
struct ext4_inode_info *ei = EXT4_I(inode);
int idxs, num = 0;
idxs = ((inode->i_sb->s_blocksize - sizeof(struct ext4_extent_header))
/ sizeof(struct ext4_extent_idx));
/*
* If the new delayed allocation block is contiguous with the
... | 0 | [
"CWE-703"
] | linux | 667eff35a1f56fa74ce98a0c7c29a40adc1ba4e3 | 71,107,578,161,531,210,000,000,000,000,000,000,000 | 39 | ext4: reimplement convert and split_unwritten
Reimplement ext4_ext_convert_to_initialized() and
ext4_split_unwritten_extents() using ext4_split_extent()
Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Tested-by: Allison Henderson <achender@linux.vnet.ibm.com> |
void update_free(rdpUpdate* update)
{
if (update != NULL)
{
OFFSCREEN_DELETE_LIST* deleteList = &(update->altsec->create_offscreen_bitmap.deleteList);
if (deleteList)
free(deleteList->indices);
free(update->pointer);
if (update->primary)
{
free(update->primary->polyline.points);
free(update->pri... | 0 | [
"CWE-125"
] | FreeRDP | f8890a645c221823ac133dbf991f8a65ae50d637 | 33,189,892,656,648,827,000,000,000,000,000,000,000 | 32 | Fixed #6005: Bounds checks in update_read_bitmap_data |
gnutls_session_get_data (gnutls_session_t session,
void *session_data, size_t * session_data_size)
{
gnutls_datum_t psession;
int ret;
if (session->internals.resumable == RESUME_FALSE)
return GNUTLS_E_INVALID_SESSION;
psession.data = session_data;
ret = _gnutls_session_pack (s... | 1 | [
"CWE-119"
] | gnutls | e82ef4545e9e98cbcb032f55d7c750b81e3a0450 | 140,767,881,933,352,200,000,000,000,000,000,000,000 | 35 | bug fix in gnutls_session_get_data(). |
static int read_off64(off_t *var, unsigned char *mem,
struct mspack_system *sys, struct mspack_file *fh)
{
#if LARGEFILE_SUPPORT
*var = EndGetI64(mem);
#else
*var = EndGetI32(mem);
if ((*var & 0x80000000) || EndGetI32(mem+4)) {
sys->message(fh, (char *)largefile_msg);
return 1;
}
#endif
re... | 0 | [
"CWE-476"
] | libmspack | 8759da8db6ec9e866cb8eb143313f397f925bb4f | 88,595,418,165,614,580,000,000,000,000,000,000,000 | 14 | Avoid returning CHM file entries that are "blank" because they have embedded null bytes |
static int selinux_sock_rcv_skb_compat(struct sock *sk, struct sk_buff *skb,
u16 family)
{
int err = 0;
struct sk_security_struct *sksec = sk->sk_security;
u32 peer_sid;
u32 sk_sid = sksec->sid;
struct common_audit_data ad;
char *addrp;
COMMON_AUDIT_DATA_INIT(&ad, NET);
ad.u.net.netif = skb->iif;
a... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 146,787,191,562,024,030,000,000,000,000,000,000,000 | 41 | 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... |
static void __maybe_unused timersubspec(struct timespec *a, const struct timespec *b)
{
a->tv_sec -= b->tv_sec;
a->tv_nsec -= b->tv_nsec;
if (a->tv_nsec < 0) {
a->tv_nsec += 1000000000;
a->tv_sec--;
}
} | 0 | [
"CWE-20",
"CWE-703"
] | sgminer | 910c36089940e81fb85c65b8e63dcd2fac71470c | 101,549,360,316,240,950,000,000,000,000,000,000,000 | 9 | stratum: parse_notify(): Don't die on malformed bbversion/prev_hash/nbit/ntime.
Might have introduced a memory leak, don't have time to check. :(
Should the other hex2bin()'s be checked?
Thanks to Mick Ayzenberg <mick.dejavusecurity.com> for finding this. |
ldns_resolver_print_fmt(FILE *output,
const ldns_output_format *fmt, const ldns_resolver *r)
{
uint16_t i;
ldns_rdf **n;
ldns_rdf **s;
size_t *rtt;
if (!r) {
return;
}
n = ldns_resolver_nameservers(r);
s = ldns_resolver_searchlist(r);
rtt = ldns_resolver_rtt(r);
fprintf(output, "port: %d\n", (int)ldns_r... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 104,328,833,930,077,030,000,000,000,000,000,000,000 | 65 | CAA and URI |
void tipc_mon_get_state(struct net *net, u32 addr,
struct tipc_mon_state *state,
int bearer_id)
{
struct tipc_monitor *mon = tipc_monitor(net, bearer_id);
struct tipc_peer *peer;
if (!tipc_mon_is_active(net, mon)) {
state->probing = false;
state->monitoring = true;
return;
}
/* Used cached state if t... | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 293,424,132,380,448,340,000,000,000,000,000,000,000 | 31 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
T& operator()(const unsigned int x, const unsigned int y, const unsigned int z, const unsigned int c) {
return _data[x + y*(ulongT)_width + z*(ulongT)_width*_height + c*(ulongT)_width*_height*_depth];
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 230,557,982,801,466,900,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static int replmd_replicated_uptodate_search_callback(struct ldb_request *req,
struct ldb_reply *ares)
{
struct replmd_replicated_request *ar = talloc_get_type(req->context,
struct replmd_replicated_request);
int ret;
if (!ares) {
return ldb_module_done(ar->req, NULL, NULL,
LDB_ERR_OP... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 208,561,667,450,826,670,000,000,000,000,000,000,000 | 36 | 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... |
DefragReverseSimpleTest(void)
{
Packet *p1 = NULL, *p2 = NULL, *p3 = NULL;
Packet *reassembled = NULL;
int id = 12;
int i;
int ret = 0;
DefragInit();
p1 = BuildTestPacket(IPPROTO_ICMP, id, 0, 1, 'A', 8);
if (p1 == NULL)
goto end;
p2 = BuildTestPacket(IPPROTO_ICMP, id, 1, 1,... | 0 | [
"CWE-358"
] | suricata | 4a04f814b15762eb446a5ead4d69d021512df6f8 | 325,133,345,745,627,630,000,000,000,000,000,000,000 | 66 | defrag - take protocol into account during re-assembly
The IP protocol was not being used to match fragments with
their packets allowing a carefully constructed packet
with a different protocol to be matched, allowing re-assembly
to complete, creating a packet that would not be re-assembled
by the destination host. |
get_user_commands(expand_T *xp UNUSED, int idx)
{
// In cmdwin, the alternative buffer should be used.
buf_T *buf =
#ifdef FEAT_CMDWIN
is_in_cmdwin() ? prevwin->w_buffer :
#endif
curbuf;
if (idx < buf->b_ucmds.ga_len)
return USER_CMD_GA(&buf->b_ucmds, idx)->uc_name;
idx -= buf->b_ucmds.ga_len;
i... | 1 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 313,339,320,243,240,260,000,000,000,000,000,000,000 | 16 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
bool IsDataURI(const std::string &in) {
std::string header = "data:application/octet-stream;base64,";
if (in.find(header) == 0) {
return true;
}
header = "data:image/jpeg;base64,";
if (in.find(header) == 0) {
return true;
}
header = "data:image/png;base64,";
if (in.find(header) == 0) {
ret... | 0 | [
"CWE-20"
] | tinygltf | 52ff00a38447f06a17eab1caa2cf0730a119c751 | 219,025,927,376,893,700,000,000,000,000,000,000,000 | 38 | Do not expand file path since its not necessary for glTF asset path(URI) and for security reason(`wordexp`). |
void OSDService::_sent_pg_temp()
{
pg_temp_pending.insert(make_move_iterator(begin(pg_temp_wanted)),
make_move_iterator(end(pg_temp_wanted)));
pg_temp_wanted.clear();
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 53,367,679,054,224,920,000,000,000,000,000,000,000 | 6 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
PHPAPI void php_store_class_name(zval *object, const char *name, zend_uint len)
{
zval *val;
TSRMLS_FETCH();
MAKE_STD_ZVAL(val);
Z_TYPE_P(val) = IS_STRING;
Z_STRVAL_P(val) = estrndup(name, len);
Z_STRLEN_P(val) = len;
zend_hash_update(Z_OBJPROP_P(object), MAGIC_MEMBER, sizeof(MAGIC_MEMBER), &val, sizeof(val... | 0 | [] | php-src | fb83c76deec58f1fab17c350f04c9f042e5977d1 | 99,128,019,760,242,810,000,000,000,000,000,000,000 | 13 | Check that the type is correct |
void esp_hard_reset(ESPState *s)
{
memset(s->rregs, 0, ESP_REGS);
memset(s->wregs, 0, ESP_REGS);
s->tchi_written = 0;
s->ti_size = 0;
s->ti_rptr = 0;
s->ti_wptr = 0;
s->dma = 0;
s->do_cmd = 0;
s->dma_cb = NULL;
s->rregs[ESP_CFG1] = 7;
} | 0 | [
"CWE-787"
] | qemu | 926cde5f3e4d2504ed161ed0cb771ac7cad6fd11 | 81,961,055,918,499,080,000,000,000,000,000,000,000 | 14 | scsi: esp: make cmdbuf big enough for maximum CDB size
While doing DMA read into ESP command buffer 's->cmdbuf', it could
write past the 's->cmdbuf' area, if it was transferring more than 16
bytes. Increase the command buffer size to 32, which is maximum when
's->do_cmd' is set, and add a check on 'len' to avoid OOB ... |
Data::Data()
: length_(0), buffer_(0), write_buffer_(0)
{} | 0 | [] | mysql-server | b9768521bdeb1a8069c7b871f4536792b65fd79b | 152,904,642,881,257,130,000,000,000,000,000,000,000 | 3 | Updated yassl to yassl-2.3.8
(cherry picked from commit 7f9941eab55ed672bfcccd382dafbdbcfdc75aaa) |
MagickExport void RemoveDuplicateLayers(Image **images,
ExceptionInfo *exception)
{
register Image
*curr,
*next;
RectangleInfo
bounds;
assert((*images) != (const Image *) NULL);
assert((*images)->signature == MagickCoreSignature);
if ((*images)->debug != MagickFalse)
(void) LogMagickEve... | 1 | [
"CWE-369"
] | ImageMagick6 | 4f31d78716ac94c85c244efcea368fea202e2ed4 | 117,734,790,236,530,270,000,000,000,000,000,000,000 | 40 | https://github.com/ImageMagick/ImageMagick/issues/1629 |
static int ec_guess_cofactor(EC_GROUP *group) {
int ret = 0;
BN_CTX *ctx = NULL;
BIGNUM *q = NULL;
/*-
* If the cofactor is too large, we cannot guess it.
* The RHS of below is a strict overestimate of lg(4 * sqrt(q))
*/
if (BN_num_bits(&group->order) <= (BN_num_bits(&group->field) +... | 0 | [] | openssl | 21c856b75d81eff61aa63b4f036bb64a85bf6d46 | 85,581,038,173,298,080,000,000,000,000,000,000,000 | 47 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
void avahi_s_dns_server_browser_free(AvahiSDNSServerBrowser *b) {
assert(b);
while (b->info)
server_info_free(b, b->info);
AVAHI_LLIST_REMOVE(AvahiSDNSServerBrowser, browser, b->server->dns_server_browsers, b);
if (b->record_browser)
avahi_s_record_browser_free(b->record_browser);
... | 0 | [] | avahi | 9d31939e55280a733d930b15ac9e4dda4497680c | 14,680,441,425,998,997,000,000,000,000,000,000,000 | 13 | Fix NULL pointer crashes from #175
avahi-daemon is crashing when running "ping .local".
The crash is due to failing assertion from NULL pointer.
Add missing NULL pointer checks to fix it.
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd |
static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
{
u32 reg;
u32 timeout = 500;
if (pm_runtime_suspended(dwc->dev))
return 0;
reg = dwc3_readl(dwc->regs, DWC3_DCTL);
if (is_on) {
if (dwc->revision <= DWC3_REVISION_187A) {
reg &= ~DWC3_DCTL_TRGTULST_MASK;
reg |= DWC3_DCTL_TRG... | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | c91815b596245fd7da349ecc43c8def670d2269e | 119,302,630,163,241,940,000,000,000,000,000,000,000 | 44 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_... |
static int hci_uart_set_proto(struct hci_uart *hu, int id)
{
const struct hci_uart_proto *p;
int err;
p = hci_uart_get_proto(id);
if (!p)
return -EPROTONOSUPPORT;
hu->proto = p;
err = hci_uart_register_dev(hu);
if (err) {
return err;
}
set_bit(HCI_UART_PROTO_READY, &hu->flags);
return 0;
} | 0 | [
"CWE-416"
] | linux | 56897b217a1d0a91c9920cb418d6b3fe922f590a | 137,659,544,477,864,160,000,000,000,000,000,000,000 | 19 | Bluetooth: hci_ldisc: Postpone HCI_UART_PROTO_READY bit set in hci_uart_set_proto()
task A: task B:
hci_uart_set_proto flush_to_ldisc
- p->open(hu) -> h5_open //alloc h5 - receive_buf
- set_bit HCI_UART_PROTO_READY - tty_port_default_receive_buf
- hci_uar... |
static void flist_expand(struct file_list *flist, int extra)
{
struct file_struct **new_ptr;
if (flist->used + extra <= flist->malloced)
return;
if (flist->malloced < FLIST_START)
flist->malloced = FLIST_START;
else if (flist->malloced >= FLIST_LINEAR)
flist->malloced += FLIST_LINEAR;
else if (flist->mallo... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 572,544,743,436,460,140,000,000,000,000,000,000 | 32 | Some extra file-list safety checks. |
void kvm_free_physmem(struct kvm *kvm)
{
struct kvm_memslots *slots = kvm->memslots;
struct kvm_memory_slot *memslot;
kvm_for_each_memslot(memslot, slots)
kvm_free_physmem_slot(memslot, NULL);
kfree(kvm->memslots);
} | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 158,023,295,057,933,030,000,000,000,000,000,000,000 | 10 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
static int filter_matches(struct tree *xfm, const char *path) {
int found = 0;
list_for_each(f, xfm->children) {
if (is_incl(f) && fnmatch_normalize(f->value, path, fnm_flags) == 0) {
found = 1;
break;
}
}
if (! found)
return 0;
list_for_each(f, xfm->c... | 0 | [] | augeas | f5b4fc0ceb0e5a2be5f3a19f63ad936897a3ac26 | 97,072,655,778,361,030,000,000,000,000,000,000,000 | 16 | Fix umask handling when creating new files
* src/transform.c (transform_save): faulty umask arithmetic would cause
overly-open file modes when the umask contains "7", as the umask was
incorrectly subtracted from the target file mode
Fixes CVE-2013-6412, RHBZ#1034261 |
napi_status napi_get_array_length(napi_env env,
napi_value value,
uint32_t* result) {
NAPI_PREAMBLE(env);
CHECK_ARG(env, value);
CHECK_ARG(env, result);
v8::Local<v8::Value> val = v8impl::V8LocalValueFromJsValue(value);
RETURN_STATUS_IF_FALS... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 11,415,781,343,408,890,000,000,000,000,000,000,000 | 15 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
static void process_SOFn (const uchar * Data, int marker)
{
int data_precision, num_components;
data_precision = Data[2];
ImageInfo.Height = Get16m(Data+3);
ImageInfo.Width = Get16m(Data+5);
num_components = Data[7];
if (num_components == 3){
ImageInfo.IsColor = 1;
}else... | 0 | [
"CWE-787"
] | jhead | 5186ddcf9e35a7aa0ff0539489a930434a1325f4 | 321,479,054,901,529,400,000,000,000,000,000,000,000 | 22 | Just allocate 20 bytes extra at the end of a section. Otherwise, we end
up with a whole lot of little checks for structures that the file says
are there but are unexpectedly cut off in fuzz tests |
would have been. */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
if (*yystr == '"')
{
YYSIZE_T yyn = 0;
char const *yyp = yystr;
for (;;)
switch (*++yyp)
{
case '\'':
case ',':
goto do_not_strip_quotes;
case '\\':
... | 0 | [
"CWE-674",
"CWE-787"
] | yara | 10e8bd3071677dd1fa76beeef4bc2fc427cea5e7 | 129,812,169,434,855,100,000,000,000,000,000,000,000 | 37 | Fix issue #674 for hex strings. |
static struct sock *__udp4_lib_demux_lookup(struct net *net,
__be16 loc_port, __be32 loc_addr,
__be16 rmt_port, __be32 rmt_addr,
int dif)
{
struct sock *sk, *result;
struct hlist_nulls_node *node;
unsigned short hnum = ntohs(loc_port);
unsigned int hash2 = udp4_portaddr_hash(net, loc_addr... | 0 | [
"CWE-358"
] | linux | 197c949e7798fbf28cfadc69d9ca0c2abbf93191 | 78,572,125,414,050,140,000,000,000,000,000,000,000 | 37 | udp: properly support MSG_PEEK with truncated buffers
Backport of this upstream commit into stable kernels :
89c22d8c3b27 ("net: Fix skb csum races when peeking")
exposed a bug in udp stack vs MSG_PEEK support, when user provides
a buffer smaller than skb payload.
In this case,
skb_copy_and_csum_datagram_iovec(skb, s... |
static void generate_json_fixnum(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj)
{
fbuffer_append_long(buffer, FIX2LONG(obj));
} | 0 | [
"CWE-119",
"CWE-787"
] | json | 8f782fd8e181d9cfe9387ded43a5ca9692266b85 | 209,389,186,590,917,760,000,000,000,000,000,000,000 | 4 | Fix arbitrary heap exposure problem |
int btrfs_removexattr(struct dentry *dentry, const char *name)
{
struct btrfs_root *root = BTRFS_I(dentry->d_inode)->root;
/*
* The permission on security.* and system.* is not checked
* in permission().
*/
if (btrfs_root_readonly(root))
return -EROFS;
/*
* If this is a request for a synthetic attribute... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339 | 334,150,446,335,899,070,000,000,000,000,000,000,000 | 29 | Btrfs: make xattr replace operations atomic
Replacing a xattr consists of doing a lookup for its existing value, delete
the current value from the respective leaf, release the search path and then
finally insert the new value. This leaves a time window where readers (getxattr,
listxattrs) won't see any value for the x... |
static void virgl_cmd_transfer_to_host_3d(VirtIOGPU *g,
struct virtio_gpu_ctrl_command *cmd)
{
struct virtio_gpu_transfer_host_3d t3d;
VIRTIO_GPU_FILL_CMD(t3d);
trace_virtio_gpu_cmd_res_xfer_toh_3d(t3d.resource_id);
virgl_renderer_transfer_write_iov(t3d.resour... | 0 | [] | qemu | 2fe760554eb3769d70f608a158474f728ba45ba6 | 299,769,224,168,988,050,000,000,000,000,000,000,000 | 16 | virtio-gpu: check max_outputs only
The scanout id should not be above the configured num_scanouts.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 1463653560-26958-5-git-send-email-marcandre.lureau@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
static void _distance_scan(const unsigned int len,
const longT *const g,
longT (*const sep)(const longT, const longT, const longT *const),
longT (*const f)(const longT, const longT, const longT *const),
... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 223,876,313,053,196,000,000,000,000,000,000,000,000 | 15 | . |
do_open_fhandle(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_open *open)
{
struct svc_fh *current_fh = &cstate->current_fh;
__be32 status;
int accmode = 0;
/* We don't know the target directory, and therefore can not
* set the change info
*/
memset(&open->op_cinfo, 0, sizeof(struct... | 0 | [
"CWE-20",
"CWE-129"
] | linux | b550a32e60a4941994b437a8d662432a486235a5 | 172,829,163,719,188,400,000,000,000,000,000,000,000 | 32 | nfsd: fix undefined behavior in nfsd4_layout_verify
UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
shift exponent 128 is too large for 32-bit type 'int'
Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64)... |
static void cleanup_server_session(MYSQL_SESSION session,
bool initialize_thread) {
srv_session_close(session);
if (initialize_thread) srv_session_deinit_thread();
} | 0 | [
"CWE-77"
] | percona-xtradb-cluster | 8a338477c9184dd0e03a5c661e9c3a79456de8a4 | 190,302,254,655,298,750,000,000,000,000,000,000,000 | 5 | PXC-3392: Donor uses invalid SST methods |
get_index_constraint(Oid indexId)
{
Oid constraintId = InvalidOid;
Relation depRel;
ScanKeyData key[3];
SysScanDesc scan;
HeapTuple tup;
/* Search the dependency table for the index */
depRel = heap_open(DependRelationId, AccessShareLock);
ScanKeyInit(&key[0],
Anum_pg_depend_classid,
BTEqualStrategy... | 0 | [
"CWE-94"
] | postgres | f52d2fbd8c62f667191b61228acf9d8aa53607b9 | 185,953,037,348,364,920,000,000,000,000,000,000,000 | 49 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
load_mark(UnpicklerObject *self)
{
/* Note that we split the (pickle.py) stack into two stacks, an
* object stack and a mark stack. Here we push a mark onto the
* mark stack.
*/
if (self->num_marks >= self->marks_size) {
size_t alloc = ((size_t)self->num_marks << 1) + 20;
Py_ssi... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 88,023,595,831,161,970,000,000,000,000,000,000,000 | 25 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
load_data_seek (struct archive *a,
void *client_data,
gint64 request,
int whence)
{
GSeekable *seekable;
GSeekType seektype;
off_t new_offset;
LoadData *load_data = client_data;
seekable = (GSeekable*)(load_data->istream);
if ((load_data->error != NULL) || (load_data->... | 0 | [
"CWE-22"
] | file-roller | 21dfcdbfe258984db89fb65243a1a888924e45a0 | 80,377,518,143,578,430,000,000,000,000,000,000,000 | 40 | libarchive: do not follow external links when extracting files
Do not extract a file if its parent is a symbolic link to a
directory external to the destination. |
pdf_filter_Tc(fz_context *ctx, pdf_processor *proc, float charspace)
{
pdf_filter_processor *p = (pdf_filter_processor*)proc;
filter_flush(ctx, p, 0);
p->gstate->pending.text.char_space = charspace;
} | 0 | [
"CWE-125"
] | mupdf | 97096297d409ec6f206298444ba00719607e8ba8 | 270,453,336,935,212,500,000,000,000,000,000,000,000 | 6 | Bug 701292: Fix test for missing/empty string. |
void StreamBase::GetFD(const FunctionCallbackInfo<Value>& args) {
// Mimic implementation of StreamBase::GetFD() and UDPWrap::GetFD().
Base* handle;
ASSIGN_OR_RETURN_UNWRAP(&handle,
args.This(),
args.GetReturnValue().Set(UV_EINVAL));
StreamBase* wrap = static... | 0 | [
"CWE-416"
] | node | 7f178663ebffc82c9f8a5a1b6bf2da0c263a30ed | 315,602,526,717,723,960,000,000,000,000,000,000,000 | 13 | src: use unique_ptr for WriteWrap
This commit attempts to avoid a use-after-free error by using unqiue_ptr
and passing a reference to it.
CVE-ID: CVE-2020-8265
Fixes: https://github.com/nodejs-private/node-private/issues/227
PR-URL: https://github.com/nodejs-private/node-private/pull/238
Reviewed-By: Michael Dawson <... |
void compat_set_fd_set(unsigned long nr, compat_ulong_t __user *ufdset,
unsigned long *fdset)
{
unsigned long odd;
nr = ROUND_UP(nr, __COMPAT_NFDBITS);
if (!ufdset)
return;
odd = nr & 1UL;
nr &= ~1UL;
while (nr) {
unsigned long h, l;
l = *fdset++;
h = l >> 32;
__put_user(l, ufdset);
__put_user(h,... | 0 | [] | linux-2.6 | 822191a2fa1584a29c3224ab328507adcaeac1ab | 6,872,181,246,311,154,000,000,000,000,000,000,000 | 23 | [PATCH] skip data conversion in compat_sys_mount when data_page is NULL
OpenVZ Linux kernel team has found a problem with mounting in compat mode.
Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
leads to oops:
Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp... |
struct xt_table *ipt_register_table(struct net *net,
const struct xt_table *table,
const struct ipt_replace *repl)
{
int ret;
struct xt_table_info *newinfo;
struct xt_table_info bootstrap = {0};
void *loc_cpu_entry;
struct xt_table *new_table;
newinfo = xt_alloc_table_info(repl->size);
if (!newi... | 0 | [
"CWE-200"
] | linux-2.6 | 78b79876761b86653df89c48a7010b5cbd41a84a | 53,611,347,463,875,590,000,000,000,000,000,000,000 | 37 | netfilter: ip_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
in... |
dissect_blip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, _U_ void *data)
{
proto_tree *blip_tree;
gint offset = 0;
/* Set the protcol column to say BLIP */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BLIP");
/* Clear out stuff in the info column */
col_clear(pinfo->cinfo,COL_INFO);
// ------------------... | 1 | [
"CWE-476"
] | wireshark | 4a948427100b6c109f4ec7b4361f0d2aec5e5c3f | 160,727,379,938,159,650,000,000,000,000,000,000,000 | 162 | BLIP: Fix decompression buffer bug
Until now, mistakenly, the buffer for decompressing compressed BLIP messages
has been statically allocated as 16 Kb, but that is not valid behavior.
16 Kb is the maximum size of a _compressed_ frame. In theory, due to the
ability to zipbomb, there is virtually no upper bound on what... |
static ZIPARCHIVE_METHOD(setExternalAttributesIndex)
{
struct zip *intern;
zval *self = getThis();
zend_long index, flags=0, opsys, attr;
struct zip_stat sb;
if (!self) {
RETURN_FALSE;
}
ZIP_FROM_OBJECT(intern, self);
if (zend_parse_parameters(ZEND_NUM_ARGS(), "lll|l",
&index, &opsys, &attr, &flags) == ... | 0 | [
"CWE-190"
] | php-src | 3b8d4de300854b3517c7acb239b84f7726c1353c | 242,794,704,829,762,020,000,000,000,000,000,000,000 | 25 | Fix bug #71923 - integer overflow in ZipArchive::getFrom* |
InputFile::InputFile (OPENEXR_IMF_INTERNAL_NAMESPACE::IStream &is, int numThreads):
_data (new Data (numThreads))
{
_data->_streamData=NULL;
_data->_deleteStream=false;
try
{
readMagicNumberAndVersionField(is, _data->version);
//
// Backward compatibility to read multpart fi... | 0 | [
"CWE-125"
] | openexr | e79d2296496a50826a15c667bf92bdc5a05518b4 | 279,095,584,719,932,600,000,000,000,000,000,000,000 | 55 | fix memory leaks and invalid memory accesses
Signed-off-by: Peter Hillman <peterh@wetafx.co.nz> |
static unsigned int rgb_to_pixel32_dup(unsigned int r, unsigned int g, unsigned b)
{
unsigned int col;
col = rgb_to_pixel32(r, g, b);
return col;
} | 0 | [
"CWE-200"
] | qemu | c1b886c45dc70f247300f549dce9833f3fa2def5 | 28,772,554,255,112,830,000,000,000,000,000,000,000 | 6 | vbe: rework sanity checks
Plug a bunch of holes in the bochs dispi interface parameter checking.
Add a function doing verification on all registers. Call that
unconditionally on every register write. That way we should catch
everything, even changing one register affecting the valid range of
another register.
Some ... |
static void nfs4_xdr_enc_create_session(struct rpc_rqst *req,
struct xdr_stream *xdr,
const void *data)
{
const struct nfs41_create_session_args *args = data;
struct compound_hdr hdr = {
.minorversion = args->client->cl_mvops->minor_version,
};
encode_compound_hdr(xdr, req, &hdr);
encode_create_sessio... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 54,861,487,140,608,560,000,000,000,000,000,000,000 | 13 | 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... |
TRIO_PRIVATE int TrioFormatProcess TRIO_ARGS3((data, format, parameters), trio_class_t* data,
TRIO_CONST char* format, trio_parameter_t* parameters)
{
int i;
#if TRIO_FEATURE_ERRNO
TRIO_CONST char* string;
#endif
trio_pointer_t pointer;
trio_flags_t flags;
int width;
... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 295,677,465,307,767,060,000,000,000,000,000,000,000 | 275 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
int del_global_table_stat(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *table)
{
TABLE_STATS *table_stats;
int res = 0;
uchar *cache_key;
size_t cache_key_length;
DBUG_ENTER("del_global_table_stat");
cache_key_length= db->length + 1 + table->length + 1;
if(!(cache_key= (uchar *)my_malloc(cache_key... | 0 | [
"CWE-416"
] | server | af810407f78b7f792a9bb8c47c8c532eb3b3a758 | 209,489,670,025,445,770,000,000,000,000,000,000,000 | 36 | MDEV-28098 incorrect key in "dup value" error after long unique
reset errkey after using it, so that it wouldn't affect
the next error message in the next statement |
addMultirowsForm(Buffer *buf, AnchorList *al)
{
int i, j, k, col, ecol, pos;
Anchor a_form, *a;
Line *l, *ls;
if (al == NULL || al->nanchor == 0)
return;
for (i = 0; i < al->nanchor; i++) {
a_form = al->anchors[i];
al->anchors[i].rows = 1;
if (a_form.hseq < 0 || a_form.rows <= 1)
continue;... | 1 | [
"CWE-119"
] | w3m | 4e464819dd360ffd3d58fa2a89216fe413cfcc74 | 272,632,127,451,804,400,000,000,000,000,000,000,000 | 53 | Prevent segfault due to buffer overflows in addMultirowsForm
Bug-Debian: https://github.com/tats/w3m/issues/21
Bug-Debian: https://github.com/tats/w3m/issues/26 |
XMLRPC_VALUE XMLRPC_VectorNext(XMLRPC_VALUE value) {
XMLRPC_VALUE xReturn = NULL;
if(value && value->type == xmlrpc_vector && value->v) {
xReturn = (XMLRPC_VALUE)Q_Next(value->v->q);
}
return xReturn;
} | 0 | [
"CWE-119"
] | php-src | 88412772d295ebf7dd34409534507dc9bcac726e | 95,995,401,540,671,940,000,000,000,000,000,000,000 | 7 | Fix bug #68027 - fix date parsing in XMLRPC lib |
static int check_chain_extensions(X509_STORE_CTX *ctx)
{
#ifdef OPENSSL_NO_CHAIN_VERIFY
return 1;
#else
int i, ok=0, must_be_ca, plen = 0;
X509 *x;
int (*cb)(int xok,X509_STORE_CTX *xctx);
int proxy_path_length = 0;
int purpose;
int allow_proxy_certs;
cb=ctx->verify_cb;
/* must_be_ca can have 1 of 3 values:
... | 0 | [] | openssl | d65b8b2162f33ac0d53dace588a0847ed827626c | 58,526,525,619,649,590,000,000,000,000,000,000,000 | 157 | Backport OCSP fixes. |
static MonoBoolean
mono_declsec_get_class_demands_params (MonoClass *klass, MonoDeclSecurityActions* demands,
guint32 id_std, guint32 id_noncas, guint32 id_choice)
{
guint32 idx = mono_metadata_token_index (klass->type_token);
idx <<= MONO_HAS_DECL_SECURITY_BITS;
idx |= MONO_HAS_DECL_SECURITY_TYPEDEF;
return fill... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 73,793,081,450,203,720,000,000,000,000,000,000,000 | 8 | 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 |
static int strlen16 (unsigned short *s)
{
int len = 0;
while (*s) {
s++;
len++;
}
return len;
} | 0 | [
"CWE-119"
] | php-src | e7f2356665c2569191a946b6fc35b437f0ae1384 | 120,983,527,725,192,970,000,000,000,000,000,000,000 | 9 | Fix #66387: Stack overflow with imagefilltoborder
The stack overflow is caused by the recursive algorithm in combination with a
very large negative coordinate passed to gdImageFillToBorder(). As there is
already a clipping for large positive coordinates to the width and height of
the image, it seems to be consequent t... |
TF_LITE_MICRO_TEST(GatherNd_BatchedIndexingIntoRank3Tensor3) {
// For input_dims[], index_dims[], or output_dims[], element 0 is the
// number of dimensions in that array, not the actual dimension data.
int input_dims[] = {3, 3, 2, 3};
int index_dims[] = {3, 2, 2, 2};
const int32_t index_data[] = {0, 1, 1, 0,... | 0 | [
"CWE-703"
] | tflite-micro | 4142e47e9e31db481781b955ed3ff807a781b494 | 274,355,461,572,464,060,000,000,000,000,000,000,000 | 17 | GatherNd verifies that an index is valid before reading. (#1286) |
static int check_device_status(struct xc2028_data *priv)
{
switch (priv->state) {
case XC2028_NO_FIRMWARE:
case XC2028_WAITING_FIRMWARE:
return -EAGAIN;
case XC2028_ACTIVE:
return 1;
case XC2028_SLEEP:
return 0;
case XC2028_NODEV:
return -ENODEV;
}
return 0;
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 8dfbcc4351a0b6d2f2d77f367552f48ffefafe18 | 267,570,091,695,903,250,000,000,000,000,000,000,000 | 15 | [media] xc2028: avoid use after free
If struct xc2028_config is passed without a firmware name,
the following trouble may happen:
[11009.907205] xc2028 5-0061: type set to XCeive xc2028/xc3028 tuner
[11009.907491] ==================================================================
[11009.907750] BUG: KASAN: use-after-... |
inline int MatchingElementsSize(const RuntimeShape& shape,
const RuntimeShape& check_shape_0,
const RuntimeShape& check_shape_1) {
const int size_1 = shape.FlatSize();
const int size_2 = check_shape_0.FlatSize();
const int size_3 = check_shape_1.Flat... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 8ee24e7949a203d234489f9da2c5bf45a7d5157d | 185,772,753,939,293,240,000,000,000,000,000,000,000 | 10 | [tflite] Ensure `MatchingDim` does not allow buffer overflow.
We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ... |
static int dns_transaction_requires_rrsig(DnsTransaction *t, DnsResourceRecord *rr) {
int r;
assert(t);
assert(rr);
/* Checks if the RR we are looking for must be signed with an
* RRSIG. This is used for positive responses. */
if (t->scope->dnssec_mode == DNSSEC_NO)
... | 0 | [
"CWE-416"
] | systemd | 904dcaf9d4933499f8334859f52ea8497f2d24ff | 50,337,899,551,714,420,000,000,000,000,000,000,000 | 140 | resolved: take particular care when detaching DnsServer from its default stream
DnsStream and DnsServer have a symbiotic relationship: one DnsStream is
the current "default" stream of the server (and thus reffed by it), but
each stream also refs the server it is connected to. This cyclic
dependency can result in weird... |
ipvs_cmd(int cmd, virtual_server_t *vs, real_server_t *rs)
{
ipvs_service_t srule;
ipvs_dest_t drule;
/* Allocate the room */
ipvs_set_srule(cmd, &srule, vs);
if (rs) {
ipvs_set_drule(cmd, &drule, rs);
/* Does the service use inhibit flag ? */
if (cmd == IP_VS_SO_SET_DELDEST && rs->inhibit) {
drule.user... | 0 | [
"CWE-200"
] | keepalived | 26c8d6374db33bcfcdcd758b1282f12ceef4b94f | 8,645,253,797,170,009,000,000,000,000,000,000,000 | 45 | Disable fopen_safe() append mode by default
If a non privileged user creates /tmp/keepalived.log and has it open
for read (e.g. tail -f), then even though keepalived will change the
owner to root and remove all read/write permissions from non owners,
the application which already has the file open will be able to read... |
void sort_extable(struct exception_table_entry *start,
struct exception_table_entry *finish)
{
struct exception_table_entry *p;
int i;
/* Convert all entries to being relative to the start of the section */
i = 0;
for (p = start; p < finish; p++) {
p->insn += i;
i += 4;
p->fixup += i;
i += 4;
p->han... | 0 | [
"CWE-264"
] | linux | 548acf19234dbda5a52d5a8e7e205af46e9da840 | 194,072,492,412,627,540,000,000,000,000,000,000,000 | 31 | x86/mm: Expand the exception table logic to allow new handling options
Huge amounts of help from Andy Lutomirski and Borislav Petkov to
produce this. Andy provided the inspiration to add classes to the
exception table with a clever bit-squeezing trick, Boris pointed
out how much cleaner it would all be if we just had... |
TEST(ExpressionReverseArrayTest, ReversesNormalArray) {
assertExpectedResults("$reverseArray",
{{{Value(BSON_ARRAY(1 << 2 << 3))}, Value(BSON_ARRAY(3 << 2 << 1))}});
} | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 124,041,088,496,305,400,000,000,000,000,000,000,000 | 4 | SERVER-38070 fix infinite loop in agg expression |
int ldb_kv_index_sub_transaction_commit(struct ldb_kv_private *ldb_kv)
{
int ret = 0;
if (ldb_kv->nested_idx_ptr == NULL) {
return LDB_SUCCESS;
}
if (ldb_kv->nested_idx_ptr->itdb == NULL) {
return LDB_SUCCESS;
}
tdb_traverse(
ldb_kv->nested_idx_ptr->itdb,
ldb_kv_sub_transaction_traverse,
ldb_k... | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 21,660,153,725,265,347,000,000,000,000,000,000,000 | 32 | CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing
The LDB filter processing is where the time is spent in the LDB stack
but the timeout event will not get run while this is ongoing, so we
must confirm we have not yet timed out manually.
RN: Ensure that the LDB request has not timed... |
AddHttpPost(char *name, size_t namelength,
char *value, size_t contentslength,
char *buffer, size_t bufferlength,
char *contenttype,
long flags,
struct curl_slist* contentHeader,
char *showfilename, char *userp,
struct curl_httppost *pa... | 0 | [
"CWE-200"
] | curl | b3875606925536f82fc61f3114ac42f29eaf6945 | 162,064,948,163,190,840,000,000,000,000,000,000,000 | 47 | curl_easy_duphandle: CURLOPT_COPYPOSTFIELDS read out of bounds
When duplicating a handle, the data to post was duplicated using
strdup() when it could be binary and contain zeroes and it was not even
zero terminated! This caused read out of bounds crashes/segfaults.
Since the lib/strdup.c file no longer is easily sha... |
int MonClient::handle_auth_bad_method(
Connection *con,
AuthConnectionMeta *auth_meta,
uint32_t old_auth_method,
int result,
const std::vector<uint32_t>& allowed_methods,
const std::vector<uint32_t>& allowed_modes)
{
auth_meta->allowed_methods = allowed_methods;
std::lock_guard l(monc_lock);
if (con-... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 239,884,630,703,699,750,000,000,000,000,000,000,000 | 56 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
build_FDArray_sub_font(i_ctx_t *i_ctx_p, ref *op,
gs_font_base **ppfont,
font_type ftype, gs_memory_type_ptr_t pstype,
const build_proc_refs * pbuild,
build_font_options_t ignore_options)
{
gs_font *pfont;
int code = bui... | 0 | [
"CWE-704"
] | ghostpdl | 548bb434e81dadcc9f71adf891a3ef5bea8e2b4e | 300,481,738,437,428,240,000,000,000,000,000,000,000 | 14 | PS interpreter - add some type checking
These were 'probably' safe anyway, since they mostly treat the objects
as integers without checking, which at least can't result in a crash.
Nevertheless, we ought to check.
The return from comparedictkeys could be wrong if one of the keys had
a value which was not an array, i... |
static void shadow_walk_init_using_root(struct kvm_shadow_walk_iterator *iterator,
struct kvm_vcpu *vcpu, hpa_t root,
u64 addr)
{
iterator->addr = addr;
iterator->shadow_addr = root;
iterator->level = vcpu->arch.mmu->shadow_root_level;
if (iterator->level >= PT64_ROOT_4LEVEL &&
vcpu->arch.mmu->root_... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 321,680,776,742,097,150,000,000,000,000,000,000,000 | 28 | KVM: x86/mmu: fix NULL pointer dereference on guest INVPCID
With shadow paging enabled, the INVPCID instruction results in a call
to kvm_mmu_invpcid_gva. If INVPCID is executed with CR0.PG=0, the
invlpg callback is not set and the result is a NULL pointer dereference.
Fix it trivially by checking for mmu->invlpg befo... |
RList *r_bin_ne_get_entrypoints(r_bin_ne_obj_t *bin) {
if (!bin->entry_table) {
return NULL;
}
RList *entries = r_list_newf (free);
if (!entries) {
return NULL;
}
RList *segments = r_bin_ne_get_segments (bin);
if (!segments) {
r_list_free (entries);
return NULL;
}
if (bin->ne_header->csEntryPoint) {
... | 1 | [
"CWE-125"
] | radare2 | 0a557045476a2969c7079aec9eeb29d02f2809c6 | 231,378,592,395,081,520,000,000,000,000,000,000,000 | 76 | Fix oobread and unaligned casts in the NE entrypoint logic ##crash
* Reported by @hmsec via huntr.dev
* Reproducer: nepocaligns
* BountyID: ec538fa4-06c6-4050-a141-f60153ddeaac |
void decNumConnections() {
ASSERT(num_listener_connections_ > 0);
--num_listener_connections_;
config_->openConnections().dec();
} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 98,349,461,488,220,960,000,000,000,000,000,000,000 | 5 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
int phar_zip_flush(phar_archive_data *phar, char *user_stub, long len, int defaultstub, char **error TSRMLS_DC) /* {{{ */
{
char *pos;
smart_str main_metadata_str = {0};
static const char newstub[] = "<?php // zip-based phar archive stub file\n__HALT_COMPILER();";
char halt_stub[] = "__HALT_COMPILER();";
char *tmp... | 0 | [
"CWE-119"
] | php-src | a6fdc5bb27b20d889de0cd29318b3968aabb57bd | 265,532,269,930,333,460,000,000,000,000,000,000,000 | 359 | Fix bug #71498: Out-of-Bound Read in phar_parse_zipfile() |
static ssize_t format_name_assign_type(const struct net_device *dev, char *buf)
{
return sprintf(buf, fmt_dec, dev->name_assign_type); | 0 | [
"CWE-401"
] | linux | 895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab | 173,308,856,600,373,460,000,000,000,000,000,000,000 | 4 | net-sysfs: Fix mem leak in netdev_register_kobject
syzkaller report this:
BUG: memory leak
unreferenced object 0xffff88837a71a500 (size 256):
comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ... |
static bool tcp_try_undo_partial(struct sock *sk, u32 prior_snd_una)
{
struct tcp_sock *tp = tcp_sk(sk);
if (tp->undo_marker && tcp_packet_delayed(tp)) {
/* Plain luck! Hole if filled with delayed
* packet, rather than with a retransmit. Check reordering.
*/
tcp_check_sack_reordering(sk, prior_snd_una, 1);... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 83,985,443,830,142,180,000,000,000,000,000,000,000 | 29 | 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 void hns_gmac_config_max_frame_length(void *mac_drv, u16 newval)
{
struct mac_driver *drv = (struct mac_driver *)mac_drv;
dsaf_set_dev_field(drv, GMAC_MAX_FRM_SIZE_REG, GMAC_MAX_FRM_SIZE_M,
GMAC_MAX_FRM_SIZE_S, newval);
dsaf_set_dev_field(drv, GAMC_RX_MAX_FRAME, GMAC_MAX_FRM_SIZE_M,
GMAC_MAX_FRM... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 147,434,528,074,769,370,000,000,000,000,000,000,000 | 10 | net: hns: fix ethtool_get_strings overflow in hns driver
hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated
is not enough for ethtool_get_strings(), which will cause random memory
corruption.
When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the
the following can be observed ... |
void virtio_config_writeb(VirtIODevice *vdev, uint32_t addr, uint32_t data)
{
VirtioDeviceClass *k = VIRTIO_DEVICE_GET_CLASS(vdev);
uint8_t val = data;
if (addr + sizeof(val) > vdev->config_len) {
return;
}
stb_p(vdev->config + addr, val);
if (k->set_config) {
k->set_config(vd... | 0 | [
"CWE-94"
] | qemu | cc45995294b92d95319b4782750a3580cabdbc0c | 158,477,352,045,686,770,000,000,000,000,000,000,000 | 15 | virtio: out-of-bounds buffer write on invalid state load
CVE-2013-4151 QEMU 1.0 out-of-bounds buffer write in
virtio_load@hw/virtio/virtio.c
So we have this code since way back when:
num = qemu_get_be32(f);
for (i = 0; i < num; i++) {
vdev->vq[i].vring.num = qemu_get_be32(f);
array of vqs has size ... |
static int ntop_set_hash_redis(lua_State* vm) {
char *key, *member, *value;
Redis *redis = ntop->getRedis();
ntop->getTrace()->traceEvent(TRACE_INFO, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, __FUNCTION__, 1, LUA_TSTRING)) return(CONST_LUA_ERROR);
if((key = (char*)lua_tostring(vm, 1)) == NULL) ... | 0 | [
"CWE-254"
] | ntopng | 2e0620be3410f5e22c9aa47e261bc5a12be692c6 | 38,606,182,949,617,017,000,000,000,000,000,000,000 | 15 | Added security fix to avoid escalating privileges to non-privileged users
Many thanks to Dolev Farhi for reporting it |
int dccp_feat_clone_list(struct list_head const *from, struct list_head *to)
{
struct dccp_feat_entry *entry, *new;
INIT_LIST_HEAD(to);
list_for_each_entry(entry, from, node) {
new = dccp_feat_clone_entry(entry);
if (new == NULL)
goto cloning_failed;
list_add_tail(&new->node, to);
}
return 0;
cloning_fa... | 0 | [
"CWE-401"
] | linux | 1d3ff0950e2b40dc861b1739029649d03f591820 | 19,338,677,049,364,744,000,000,000,000,000,000,000 | 17 | dccp: Fix memleak in __feat_register_sp
If dccp_feat_push_change fails, we forget free the mem
which is alloced by kmemdup in dccp_feat_clone_sp_val.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values")
Reviewed-by: Mukesh Ojha <mojha@codeaurora.o... |
SignatureAlgorithm CertManager::get_peerKeyType() const
{
return peerKeyType_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 60,100,768,676,184,100,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
const char *smb_vfs_call_connectpath(struct vfs_handle_struct *handle,
const char *filename)
{
VFS_FIND(connectpath);
return handle->fns->connectpath(handle, filename);
} | 0 | [
"CWE-22"
] | samba | bd269443e311d96ef495a9db47d1b95eb83bb8f4 | 267,723,369,056,392,200,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 void icmp_unreach(struct sk_buff *skb)
{
const struct iphdr *iph;
struct icmphdr *icmph;
int hash, protocol;
const struct net_protocol *ipprot;
u32 info = 0;
struct net *net;
net = dev_net(skb_dst(skb)->dev);
/*
* Incomplete header ?
* Only checks for the IP header, there should be an
* addition... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 5,412,525,854,302,840,000,000,000,000,000,000,000 | 115 | 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... |
bitset_or(BitSetRef dest, BitSetRef bs)
{
int i;
for (i = 0; i < BITSET_SIZE; i++) { dest[i] |= bs[i]; }
} | 0 | [
"CWE-476"
] | Onigmo | 00cc7e28a3ed54b3b512ef3b58ea737a57acf1f9 | 115,749,236,234,485,240,000,000,000,000,000,000,000 | 5 | Fix SEGV in onig_error_code_to_str() (Fix #132)
When onig_new(ONIG_SYNTAX_PERL) fails with ONIGERR_INVALID_GROUP_NAME,
onig_error_code_to_str() crashes.
onig_scan_env_set_error_string() should have been used when returning
ONIGERR_INVALID_GROUP_NAME. |
static void decode_block(uint8_t *src, uint8_t *dest, unsigned size,
uint32_t key, uint32_t *key_ptr,
int align)
{
unsigned s = size;
char tmp[4];
int a2;
if (!size)
return;
align &= 3;
a2 = (4 - align) & 3;
if (align) {
ui... | 0 | [
"CWE-787"
] | FFmpeg | 27a99e2c7d450fef15594671eef4465c8a166bd7 | 5,573,562,816,272,039,000,000,000,000,000,000,000 | 39 | avformat/vividas: improve extradata packing checks in track_header()
Fixes: out of array accesses
Fixes: 26622/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6581200338288640
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermaye... |
scanner_raise_error (parser_context_t *context_p) /**< context */
{
PARSER_THROW (context_p->try_buffer);
/* Should never been reached. */
JERRY_ASSERT (0);
} /* scanner_raise_error */ | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 81,251,651,142,085,620,000,000,000,000,000,000,000 | 6 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
PHP_FUNCTION(locale_get_all_variants)
{
const char* loc_name = NULL;
int loc_name_len = 0;
int result = 0;
char* token = NULL;
char* variant = NULL;
char* saved_ptr = NULL;
intl_error_reset( NULL TSRMLS_CC );
if(zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "s",
&loc_name, &loc_name... | 1 | [
"CWE-125"
] | php-src | 97eff7eb57fc2320c267a949cffd622c38712484 | 328,733,546,721,628,380,000,000,000,000,000,000,000 | 51 | Fix bug #72241: get_icu_value_internal out-of-bounds read |
lyd_new_output(struct lyd_node *parent, const struct lys_module *module, const char *name)
{
const struct lys_node *snode = NULL, *siblings;
if ((!parent && !module) || !name) {
LOGARG;
return NULL;
}
siblings = lyd_new_find_schema(parent, module, 1);
if (!siblings) {
LOGAR... | 0 | [
"CWE-119"
] | libyang | 32fb4993bc8bb49e93e84016af3c10ea53964be5 | 287,666,599,883,023,950,000,000,000,000,000,000,000 | 24 | schema tree BUGFIX do not check features while still resolving schema
Fixes #723 |
int __kvm_set_memory_region(struct kvm *kvm,
struct kvm_userspace_memory_region *mem)
{
int r;
gfn_t base_gfn;
unsigned long npages;
struct kvm_memory_slot *slot;
struct kvm_memory_slot old, new;
struct kvm_memslots *slots = NULL, *old_memslots;
enum kvm_mr_change change;
r = check_memory_region_flags(m... | 0 | [
"CWE-20"
] | linux | 338c7dbadd2671189cec7faf64c84d01071b3f96 | 279,694,386,872,510,200,000,000,000,000,000,000,000 | 183 | KVM: Improve create VCPU parameter (CVE-2013-4587)
In multiple functions the vcpu_id is used as an offset into a bitfield. Ag
malicious user could specify a vcpu_id greater than 255 in order to set or
clear bits in kernel memory. This could be used to elevate priveges in the
kernel. This patch verifies that the vcp... |
explicit DeletingState(const pair<spg_t, PGRef> &in) :
lock("DeletingState::lock"), status(QUEUED), stop_deleting(false),
pgid(in.first), old_pg_state(in.second) {
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 204,422,310,056,801,860,000,000,000,000,000,000,000 | 4 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
get_u32_le(const void *vp)
{
const u_char *p = (const u_char *)vp;
u_int32_t v;
v = (u_int32_t)p[0];
v |= (u_int32_t)p[1] << 8;
v |= (u_int32_t)p[2] << 16;
v |= (u_int32_t)p[3] << 24;
return (v);
} | 0 | [] | openssh-portable | f3cbe43e28fe71427d41cfe3a17125b972710455 | 262,798,909,601,984,460,000,000,000,000,000,000,000 | 12 | upstream: need initgroups() before setresgid(); reported by anton@,
ok deraadt@
OpenBSD-Commit-ID: 6aa003ee658b316960d94078f2a16edbc25087ce |
static int checkout_verify_paths(
git_repository *repo,
int action,
git_diff_delta *delta)
{
unsigned int flags = GIT_PATH_REJECT_WORKDIR_DEFAULTS;
if (action & CHECKOUT_ACTION__REMOVE) {
if (!git_path_isvalid(repo, delta->old_file.path, delta->old_file.mode, flags)) {
git_error_set(GIT_ERROR_CHECKOUT, "cann... | 1 | [
"CWE-20",
"CWE-706"
] | libgit2 | 64c612cc3e25eff5fb02c59ef5a66ba7a14751e4 | 45,571,445,835,721,860,000,000,000,000,000,000,000 | 23 | Protect against 8.3 "short name" attacks also on Linux/macOS
The Windows Subsystem for Linux (WSL) is getting increasingly popular,
in particular because it makes it _so_ easy to run Linux software on
Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to
`/mnt/c/`, no need to set that up manually).
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.