func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void LibRaw::process_Sony_0x940e(uchar *buf, ushort len, unsigned long long id)
{
if (((imSony.CameraType != LIBRAW_SONY_SLT) &&
(imSony.CameraType != LIBRAW_SONY_ILCA)) ||
(id == SonyID_SLT_A33) ||
(id == SonyID_SLT_A55) ||
(id == SonyID_SLT_A35) ||
(len < 3))
return;
imSony.A... | 0 | [
"CWE-125"
] | LibRaw | c243f4539233053466c1309bde606815351bee81 | 234,493,754,735,590,100,000,000,000,000,000,000,000 | 38 | additional checks in parseSonySRF
parseSonySR2: buffer size check |
static void hns_gmac_pause_frm_cfg(void *mac_drv, u32 rx_pause_en,
u32 tx_pause_en)
{
u32 pause_en;
struct mac_driver *drv = (struct mac_driver *)mac_drv;
pause_en = dsaf_read_dev(drv, GMAC_PAUSE_EN_REG);
dsaf_set_bit(pause_en, GMAC_PAUSE_EN_RX_FDFC_B, !!rx_pause_en);
dsaf_set_bit(pause_en, GMAC_PAUSE_EN_T... | 0 | [
"CWE-119",
"CWE-703"
] | linux | 412b65d15a7f8a93794653968308fc100f2aa87c | 277,873,270,174,906,060,000,000,000,000,000,000,000 | 11 | 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 ... |
static SCSIRequest *scsi_block_new_request(SCSIDevice *d, uint32_t tag,
uint32_t lun, uint8_t *buf,
void *hba_private)
{
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, d);
if (scsi_block_is_passthrough(s, buf)) {
r... | 0 | [
"CWE-193"
] | qemu | b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8 | 279,763,588,394,091,360,000,000,000,000,000,000,000 | 14 | hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().
Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa... |
static void qeth_irq(struct ccw_device *cdev, unsigned long intparm,
struct irb *irb)
{
int rc;
int cstat, dstat;
struct qeth_cmd_buffer *buffer;
struct qeth_channel *channel;
struct qeth_card *card;
struct qeth_cmd_buffer *iob;
__u8 index;
if (__qeth_check_irb_error(cdev, intparm, irb))
return;
cstat = i... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 147,510,879,414,209,360,000,000,000,000,000,000,000 | 109 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
slow_search(OnigEncoding enc, UChar* target, UChar* target_end,
const UChar* text, const UChar* text_end, UChar* text_range)
{
UChar *t, *p, *s, *end;
end = (UChar* )text_end;
end -= target_end - target - 1;
if (end > text_range)
end = text_range;
s = (UChar* )text;
while (s < end) {
... | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 173,132,651,336,286,630,000,000,000,000,000,000,000 | 29 | fix heap-buffer-overflow |
void kvm_mmu_invlpg(struct kvm_vcpu *vcpu, gva_t gva)
{
kvm_mmu_invalidate_gva(vcpu, vcpu->arch.walk_mmu, gva, INVALID_PAGE);
++vcpu->stat.invlpg;
} | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 283,707,105,557,455,500,000,000,000,000,000,000,000 | 5 | 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... |
static void cume_distStepFunc(
sqlite3_context *pCtx,
int nArg,
sqlite3_value **apArg
){
struct CallCount *p;
UNUSED_PARAMETER(nArg); assert( nArg==0 );
UNUSED_PARAMETER(apArg);
p = (struct CallCount*)sqlite3_aggregate_context(pCtx, sizeof(*p));
if( p ){
p->nTotal++;
}
} | 0 | [
"CWE-476"
] | sqlite | 75e95e1fcd52d3ec8282edb75ac8cd0814095d54 | 257,822,190,826,828,350,000,000,000,000,000,000,000 | 13 | When processing constant integer values in ORDER BY clauses of window
definitions (see check-in [7e4809eadfe99ebf]) be sure to fully disable
the constant value to avoid an invalid pointer dereference if the expression
is ever duplicated. This fixes a crash report from Yongheng and Rui.
FossilOrigin-Name: 1ca0bd982ab11... |
void WebContents::Message(bool internal,
const std::string& channel,
blink::CloneableMessage arguments,
content::RenderFrameHost* render_frame_host) {
TRACE_EVENT1("electron", "WebContents::Message", "channel", channel);
// webContents.em... | 1 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 70,589,757,098,179,840,000,000,000,000,000,000,000 | 11 | fix: ensure ElectronBrowser mojo service is only bound to appropriate render frames (#33344)
* fix: ensure ElectronBrowser mojo service is only bound to authorized render frames
Notes: no-notes
* refactor: extract electron API IPC to its own mojo interface
* fix: just check main frame not primary main frame
... |
ns_input(void)
{
uint8_t flags = 0;
LOG_INFO("Received NS from ");
LOG_INFO_6ADDR(&UIP_IP_BUF->srcipaddr);
LOG_INFO_(" to ");
LOG_INFO_6ADDR(&UIP_IP_BUF->destipaddr);
LOG_INFO_(" with target address ");
LOG_INFO_6ADDR((uip_ipaddr_t *) (&UIP_ND6_NS_BUF->tgtipaddr));
LOG_INFO_("\n");
UIP_STAT(++uip_sta... | 1 | [
"CWE-20"
] | contiki-ng | a4597001d50a04f4b9c78f323ba731e2f979802c | 84,843,070,962,167,000,000,000,000,000,000,000,000 | 183 | Check whether there is enough space for ND6 option headers when processing
incoming packets. |
static void print_track(const char *s, struct track *t)
{
if (!t->addr)
return;
printk(KERN_ERR "INFO: %s in ", s);
__print_symbol("%s", (unsigned long)t->addr);
printk(" age=%lu cpu=%u pid=%d\n", jiffies - t->when, t->cpu, t->pid);
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 245,582,502,841,978,120,000,000,000,000,000,000,000 | 9 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
RI_FKey_restrict_upd(PG_FUNCTION_ARGS)
{
/*
* Check that this is a valid trigger call on the right time and event.
*/
ri_CheckTrigger(fcinfo, "RI_FKey_restrict_upd", RI_TRIGTYPE_UPDATE);
/*
* Share code with NO ACTION case.
*/
return ri_restrict_upd((TriggerData *) fcinfo->context, false);
} | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 21,350,649,111,234,676,000,000,000,000,000,000,000 | 12 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
static BROTLI_INLINE uint32_t GetInsertExtra(uint16_t inscode) {
return kInsExtra[inscode];
} | 1 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 31,687,417,468,216,177,000,000,000,000,000,000,000 | 3 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
struct pipe_inode_info *pipe, size_t len,
unsigned int flags)
{
struct socket *sock = file->private_data;
if (unlikely(!sock->ops->splice_read))
return -EINVAL;
sock_update_classid(sock->sk);
return sock->ops->splice_read(sock, ppos, pipe... | 0 | [] | linux-2.6 | 644595f89620ba8446cc555be336d24a34464950 | 122,434,776,292,135,040,000,000,000,000,000,000,000 | 13 | compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c
Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct
timeval and struct timespec to userspace in net/socket.c.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> |
setval_internal_tilde (int comind, const char *com, const char *val)
{
bool ret;
int homelen;
char **pstring;
ret = setval_internal (comind, com, val);
/* We make tilde expansion for cmd_file and cmd_directory */
if (((commands[comind].action == cmd_file) ||
(commands[comind].action == cmd_directory... | 0 | [
"CWE-200"
] | wget | c125d24762962d91050d925fbbd9e6f30b2302f8 | 49,545,329,684,716,980,000,000,000,000,000,000,000 | 30 | Don't use extended attributes (--xattr) by default
* src/init.c (defaults): Set enable_xattr to false by default
* src/main.c (print_help): Reverse option logic of --xattr
* doc/wget.texi: Add description for --xattr
Users may not be aware that the origin URL and Referer are saved
including credentials, and possibly ... |
join_ft_read_first(JOIN_TAB *tab)
{
int error;
TABLE *table= tab->table;
if (!table->file->inited &&
(error= table->file->ha_index_init(tab->ref.key, 1)))
{
(void) report_error(table, error);
return 1;
}
table->file->ft_init();
if ((error= table->file->ha_ft_read(table->record[0])))
r... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 257,235,043,109,656,330,000,000,000,000,000,000,000 | 18 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
void exit_aio(struct mm_struct *mm)
{
struct kioctx_table *table;
struct kioctx *ctx;
unsigned i = 0;
while (1) {
struct completion requests_done =
COMPLETION_INITIALIZER_ONSTACK(requests_done);
rcu_read_lock();
table = rcu_dereference(mm->ioctx_table);
do {
if (!table || i >= table->nr) {
rcu_... | 0 | [] | linux-stable | c4f4b82694fe48b02f7a881a1797131a6dad1364 | 59,425,276,855,182,140,000,000,000,000,000,000,000 | 43 | AIO: properly check iovec sizes
In Linus's tree, the iovec code has been reworked massively, but in
older kernels the AIO layer should be checking this before passing the
request on to other layers.
Many thanks to Ben Hawkes of Google Project Zero for pointing out the
issue.
Reported-by: Ben Hawkes <hawkes@google.co... |
int MACH0_(get_bits_from_hdr)(struct MACH0_(mach_header) * hdr) {
if (hdr->magic == MH_MAGIC_64 || hdr->magic == MH_CIGAM_64) {
return 64;
}
if (hdr->cputype == CPU_TYPE_ARM64_32) { // new apple watch aka arm64_32
return 64;
}
if ((hdr->cpusubtype & CPU_SUBTYPE_MASK) == (CPU_SUBTYPE_ARM_V7K << 24)) {
return ... | 0 | [
"CWE-787"
] | rizin | 348b1447d1452f978b69631d6de5b08dd3bdf79d | 63,307,635,238,227,590,000,000,000,000,000,000,000 | 12 | fix #2956 - oob write in mach0.c |
static GF_Err gf_sm_load_initialize_svg(GF_SceneLoader *load, const char *str_data, Bool is_fragment)
{
GF_Err e;
GF_SVG_Parser *parser;
if (str_data) {
char BOM[6];
BOM[0] = str_data[0];
BOM[1] = str_data[1];
BOM[2] = str_data[2];
BOM[3] = str_data[3];
BOM[4] = BOM[5] = 0;
parser = svg_new_parser(loa... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 91,754,523,350,449,130,000,000,000,000,000,000,000 | 59 | fixed #2138 |
static Token *new_Token_free(Token * next, enum pp_token_type type,
char *text, size_t txtlen)
{
Token *t = alloc_Token();
t->next = next;
t->type = type;
t->len = tok_check_len(txtlen);
if (txtlen <= INLINE_TEXT) {
memcpy(t->text.a, text, txtlen);
free... | 0 | [] | nasm | 6299a3114ce0f3acd55d07de201a8ca2f0a83059 | 203,739,943,989,380,730,000,000,000,000,000,000,000 | 18 | BR 3392708: fix NULL pointer reference for invalid %stacksize
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Inte... |
static ssize_t queue_io_min_show(struct request_queue *q, char *page)
{
return queue_var_show(queue_io_min(q), page);
} | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 310,734,083,068,765,170,000,000,000,000,000,000,000 | 4 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
MSG_PROCESS_RETURN ossl_statem_client_process_message(SSL *s, PACKET *pkt)
{
OSSL_STATEM *st = &s->statem;
switch (st->hand_state) {
case TLS_ST_CR_SRVR_HELLO:
return tls_process_server_hello(s, pkt);
case DTLS_ST_CR_HELLO_VERIFY_REQUEST:
return dtls_process_hello_verify(s, pkt);
... | 0 | [
"CWE-476"
] | openssl | efbe126e3ebb9123ac9d058aa2bb044261342aaa | 95,236,693,118,797,870,000,000,000,000,000,000,000 | 42 | Fix missing NULL checks in CKE processing
Reviewed-by: Rich Salz <rsalz@openssl.org> |
void init_ssh_dissector(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t *id, NDPI_PROTOCOL_BITMASK *detection_bitmask)
{
ndpi_set_bitmask_protocol_detection("SSH", ndpi_struct, detection_bitmask, *id,
NDPI_PROTOCOL_SSH,
ndpi_search_ssh_tcp,
NDPI_SELECTION_BITMASK_PROTOCOL_V4_... | 0 | [
"CWE-125",
"CWE-787"
] | nDPI | 3bbb0cd3296023f6f922c71d21a1c374d2b0a435 | 100,500,105,599,317,100,000,000,000,000,000,000,000 | 11 | ssh: adds systematic bounds checks in concat_hash_string
cf GHSL-2020-052 |
void TDStretch::overlapStereo(float *pOutput, const float *pInput) const
{
int i;
float fScale;
float f1;
float f2;
fScale = 1.0f / (float)overlapLength;
f1 = 0;
f2 = 1.0f;
for (i = 0; i < 2 * (int)overlapLength ; i += 2)
{
pOutput[i + 0] = pInput[i + 0] * f... | 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 39,333,940,451,994,120,000,000,000,000,000,000,000 | 21 | Replaced illegal-number-of-channel assertions with run-time exception |
TIFFWriteDirectoryTagSbyte(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, int8 value)
{
if (dir==NULL)
{
(*ndir)++;
return(1);
}
return(TIFFWriteDirectoryTagCheckedSbyte(tif,ndir,dir,tag,value));
} | 0 | [
"CWE-617"
] | libtiff | de144fd228e4be8aa484c3caf3d814b6fa88c6d9 | 28,494,455,190,719,058,000,000,000,000,000,000,000 | 9 | TIFFWriteDirectorySec: avoid assertion. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2795. CVE-2018-10963 |
static int kvm_s390_cpus_from_pv(struct kvm *kvm, u16 *rcp, u16 *rrcp)
{
struct kvm_vcpu *vcpu;
u16 rc, rrc;
int ret = 0;
int i;
/*
* We ignore failures and try to destroy as many CPUs as possible.
* At the same time we must not free the assigned resources when
* this fails, as the ultravisor has still acce... | 0 | [
"CWE-416"
] | linux | 0774a964ef561b7170d8d1b1bfe6f88002b6d219 | 70,371,804,549,305,570,000,000,000,000,000,000,000 | 26 | KVM: Fix out of range accesses to memslots
Reset the LRU slot if it becomes invalid when deleting a memslot to fix
an out-of-bounds/use-after-free access when searching through memslots.
Explicitly check for there being no used slots in search_memslots(), and
in the caller of s390's approximation variant.
Fixes: 369... |
int sqlite3Select(
Parse *pParse, /* The parser context */
Select *p, /* The SELECT statement being coded. */
SelectDest *pDest /* What to do with the query results */
){
int i, j; /* Loop counters */
WhereInfo *pWInfo; /* Return from sqlite3WhereBegin() */
Vdbe *v;... | 1 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 135,922,683,855,403,320,000,000,000,000,000,000,000 | 1,060 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
static inline bool nested_vmx_allowed(struct kvm_vcpu *vcpu)
{
return nested && guest_cpuid_has_vmx(vcpu);
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 230,757,023,099,310,570,000,000,000,000,000,000,000 | 4 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
ns_rprint(netdissect_options *ndo,
register const u_char *cp, register const u_char *bp, int is_mdns)
{
register u_int i, class, opt_flags = 0;
register u_short typ, len;
register const u_char *rp;
if (ndo->ndo_vflag) {
ND_PRINT((ndo, " "));
if ((cp = ns_nprint(ndo, cp, bp)) == NULL)
return NULL;
... | 0 | [
"CWE-399",
"CWE-835"
] | tcpdump | 3a76fd7c95fced2c2f8c8148a9055c3a542eff29 | 320,682,557,331,026,150,000,000,000,000,000,000,000 | 217 | CVE-2017-12995/Check for DNS compression pointers that don't point backwards.
This is what BIND 9.11.0-P2 does; it not only detects pointers that
loop, as "point backwards" means "point before anything we've processed
so far, including what we're processing right now", so the pointer can't
point to itself (as that's w... |
static int parseGlobals(struct cli_bc *bc, unsigned char *buffer)
{
unsigned i, offset = 1, len = strlen((const char*)buffer), numglobals;
unsigned maxglobal;
char ok=1;
if (buffer[0] != 'G') {
cli_errmsg("bytecode: Invalid globals header: %c\n", buffer[0]);
return CL_EMALFDB;
}
maxglobal = r... | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 61,117,238,366,241,950,000,000,000,000,000,000,000 | 49 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
QString Helper::getPartcloneExecuter(const DPartInfo &info)
{
QString executor;
switch (info.fileSystemType()) {
case DPartInfo::Invalid:
break;
case DPartInfo::Btrfs:
executor = "btrfs";
break;
case DPartInfo::EXT2:
case DPartInfo::EXT3:
case DPartInfo::EXT4:
... | 0 | [
"CWE-59",
"CWE-61"
] | deepin-clone | e079f3e2712b4f8c28e3e63e71ba1a1f90fce1ab | 91,747,023,080,567,950,000,000,000,000,000,000,000 | 55 | fix: Do not use the "/tmp" directory
https://github.com/linuxdeepin/deepin-clone/issues/16
https://bugzilla.opensuse.org/show_bug.cgi?id=1130388 |
static void smack_inode_getsecid(struct inode *inode, u32 *secid)
{
struct smack_known *skp = smk_of_inode(inode);
*secid = skp->smk_secid;
} | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 136,808,194,212,974,710,000,000,000,000,000,000,000 | 6 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
void vQueueWaitForMessageRestricted( QueueHandle_t xQueue,
TickType_t xTicksToWait,
const BaseType_t xWaitIndefinitely )
{
Queue_t * const pxQueue = xQueue;
/* This function should not be called by applicati... | 0 | [
"CWE-200",
"CWE-190"
] | FreeRTOS-Kernel | 47338393f1f79558f6144213409f09f81d7c4837 | 179,737,400,585,467,100,000,000,000,000,000,000,000 | 34 | add assert for addition overflow on queue creation (#225) |
static int process_proxy_cond(unsigned int letters[26],
const char *cond, const char **cond_end)
{
int pos = 1;
return process_proxy_cond_adders(letters, cond, cond_end, &pos, 1);
} | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 165,569,799,600,880,870,000,000,000,000,000,000,000 | 6 | Add SRP support. |
hermesBuiltinArraySpread(void *, Runtime *runtime, NativeArgs args) {
Handle<JSArray> target = args.dyncastArg<JSArray>(0);
// To be safe, check for non-arrays.
if (!target) {
return runtime->raiseTypeError(
"HermesBuiltin.arraySpread requires an array target");
}
MutableHandle<> nextValue{runtim... | 0 | [
"CWE-787"
] | hermes | 86543ac47e59c522976b5632b8bf9a2a4583c7d2 | 217,724,696,513,215,170,000,000,000,000,000,000,000 | 112 | Added stack overflow check for hermes::vm:: hermesBuiltinApply
Summary: This adds a missing check for stack overflow.
Reviewed By: tmikov
Differential Revision: D20104955
fbshipit-source-id: 1f37e23d2e28ebcd3aa4176d134b8418e7059ebd |
static inline int audit_copy_fcaps(struct audit_names *name,
const struct dentry *dentry)
{
struct cpu_vfs_cap_data caps;
int rc;
if (!dentry)
return 0;
rc = get_vfs_caps_from_disk(dentry, &caps);
if (rc)
return rc;
name->fcap.permitted = caps.permitted;
name->fcap.inheritable = caps.inheritable;
... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 254,076,264,086,412,300,000,000,000,000,000,000,000 | 21 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
word_match( const byte *uid, size_t uidlen, const byte *pattern )
{
size_t wlen, n;
const byte *p;
const byte *s;
for( s=pattern; *s; ) {
do {
/* skip leading delimiters */
while( uidlen && !word_match_chars[*uid] )
uid++, uidlen--;
/* get length of the word */
n = uidlen; p = ui... | 0 | [
"CWE-416"
] | gnupg | f0f71a721ccd7ab9e40b8b6b028b59632c0cc648 | 159,783,820,833,499,620,000,000,000,000,000,000,000 | 37 | gpg: Prevent an invalid memory read using a garbled keyring.
* g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
types.
* g10/keydb.c (parse_keyblock_image): Ditto.
--
The keyring DB code did not reject packets which don't belong into a
keyring. If for example the keyblock contains a literal data packet... |
inline napi_status Wrap(napi_env env,
napi_value js_object,
void* native_object,
napi_finalize finalize_cb,
void* finalize_hint,
napi_ref* result) {
NAPI_PREAMBLE(env);
CHECK_ARG(env, js_object);
... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 25,574,019,154,407,743,000,000,000,000,000,000,000 | 49 | 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... |
mono_image_create_method_token (MonoDynamicImage *assembly, MonoObject *obj, MonoArray *opt_param_types)
{
MonoClass *klass;
guint32 token = 0;
klass = obj->vtable->klass;
if (strcmp (klass->name, "MonoMethod") == 0) {
MonoMethod *method = ((MonoReflectionMethod *)obj)->method;
MonoMethodSignature *sig, *old;
... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 271,229,673,427,954,000,000,000,000,000,000,000,000 | 70 | 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 struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
{
static int64 modtime, atime;
#ifdef SUPPORT_CRTIMES
static time_t crtime;
#endif
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
static dev_t rdev;
static uint32 rdev_major;
static uid_t uid;
static g... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 60,054,899,541,027,200,000,000,000,000,000,000,000 | 537 | Some extra file-list safety checks. |
virtual void store_TIME(my_time_t timestamp, ulong sec_part)
{
int4store(ptr,timestamp);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 136,407,993,161,841,840,000,000,000,000,000,000,000 | 4 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context,
GetOutputSafe(context, node, kOutputTensor, &output));
const int num_elem... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 129,557,728,721,274,820,000,000,000,000,000,000,000 | 26 | [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... |
static int pep_accept_conn(struct sock *sk, struct sk_buff *skb)
{
static const u8 data[20] = {
PAD, PAD, PAD, 2 /* sub-blocks */,
PN_PIPE_SB_REQUIRED_FC_TX, pep_sb_size(5), 3, PAD,
PN_MULTI_CREDIT_FLOW_CONTROL,
PN_ONE_CREDIT_FLOW_CONTROL,
PN_LEGACY_FLOW_CONTROL,
PAD,
PN_PIPE_SB_PREFERRED_FC_RX, pep_... | 0 | [
"CWE-200"
] | net | bcd0f93353326954817a4f9fa55ec57fb38acbb0 | 18,550,538,592,136,088,000,000,000,000,000,000,000 | 20 | phonet: refcount leak in pep_sock_accep
sock_hold(sk) is invoked in pep_sock_accept(), but __sock_put(sk) is not
invoked in subsequent failure branches(pep_accept_conn() != 0).
Signed-off-by: Hangyu Hua <hbh25y@gmail.com>
Link: https://lore.kernel.org/r/20211209082839.33985-1-hbh25y@gmail.com
Signed-off-by: Jakub Kic... |
DefragSturgesNovakLastTest(void)
{
/* Expected data. */
u_char expected[] = {
"AAAAAAAA"
"JJJJJJJJ"
"JJJJJJJJ"
"JJJJJJJJ"
"JJJJJJJJ"
"BBBBBBBB"
"KKKKKKKK"
"KKKKKKKK"
"KKKKKKKK"
"LLLLLLLL"
"LLLLLLLL"
"LLLLLLLL"
... | 0 | [
"CWE-358"
] | suricata | 4a04f814b15762eb446a5ead4d69d021512df6f8 | 257,837,519,718,785,800,000,000,000,000,000,000,000 | 32 | 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. |
static int __init percpu_enable_async(void)
{
pcpu_async_enabled = true;
return 0;
} | 0 | [] | linux | 4f996e234dad488e5d9ba0858bc1bae12eff82c3 | 216,213,948,730,886,900,000,000,000,000,000,000,000 | 5 | percpu: fix synchronization between chunk->map_extend_work and chunk destruction
Atomic allocations can trigger async map extensions which is serviced
by chunk->map_extend_work. pcpu_balance_work which is responsible for
destroying idle chunks wasn't synchronizing properly against
chunk->map_extend_work and may end u... |
static void qeth_clear_dbf_list(void)
{
struct qeth_dbf_entry *entry, *tmp;
mutex_lock(&qeth_dbf_list_mutex);
list_for_each_entry_safe(entry, tmp, &qeth_dbf_list, dbf_list) {
list_del(&entry->dbf_list);
debug_unregister(entry->dbf_info);
kfree(entry);
}
mutex_unlock(&qeth_dbf_list_mutex);
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 263,820,452,471,396,360,000,000,000,000,000,000,000 | 12 | qeth: avoid buffer overflow in snmp ioctl
Check user-defined length in snmp ioctl request and allow request
only if it fits into a qeth command buffer.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Heiko Carstens <heicars2@linux.vnet.ibm.c... |
static void init_once(void *foo)
{
struct socket_alloc *ei = (struct socket_alloc *)foo;
inode_init_once(&ei->vfs_inode);
} | 0 | [
"CWE-264"
] | net | 4de930efc23b92ddf88ce91c405ee645fe6e27ea | 181,277,913,749,628,400,000,000,000,000,000,000,000 | 6 | net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net> |
MOBI_RET mobi_parse_huff(MOBIHuffCdic *huffcdic, const MOBIPdbRecord *record) {
MOBIBuffer *buf = mobi_buffer_init_null(record->data, record->size);
if (buf == NULL) {
debug_print("%s\n", "Memory allocation failed");
return MOBI_MALLOC_FAILED;
}
char huff_magic[5];
mobi_buffer_getstr... | 0 | [
"CWE-119",
"CWE-125"
] | libmobi | bec783e6212439a335ba6e8df7ab8ed610ca9a21 | 317,503,448,518,034,960,000,000,000,000,000,000,000 | 45 | Fix potential out-of-buffer read while parsing corrupt file, closes #35, #36 |
static void tcp_mark_lost_retrans(struct sock *sk)
{
const struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *skb;
int cnt = 0;
u32 new_low_seq = tp->snd_nxt;
u32 received_upto = tcp_highest_sack_seq(tp);
if (!tcp_is_fack(tp) || !tp->retrans_out ||
!after(re... | 0 | [] | net-next | fdf5af0daf8019cec2396cdef8fb042d80fe71fa | 178,422,507,902,441,980,000,000,000,000,000,000,000 | 54 | tcp: drop SYN+FIN messages
Denys Fedoryshchenko reported that SYN+FIN attacks were bringing his
linux machines to their limits.
Dont call conn_request() if the TCP flags includes SYN flag
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S... |
void CLASS identify()
{
char head[32], *cp;
int hlen, flen, fsize, zero_fsize=1, i, c, is_canon;
struct jhead jh;
short pana[][6] = {
{ 3130, 1743, 4, 0, -6, 0 },
{ 3130, 2055, 4, 0, -6, 0 },
{ 3130, 2319, 4, 0, -6, 0 },
{ 3170, 2103, 18, 0,-42, 20 },
{ 3170, 2367, 18, 13,-42,-21 }... | 0 | [
"CWE-189"
] | rawstudio | 983bda1f0fa5fa86884381208274198a620f006e | 219,365,764,547,369,760,000,000,000,000,000,000,000 | 1,534 | Avoid overflow in ljpeg_start(). |
PHP_FUNCTION(curl_exec)
{
CURLcode error;
zval *zid;
php_curl *ch;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "r", &zid) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(ch, php_curl *, zid, -1, le_curl_name, le_curl);
_php_curl_verify_handlers(ch, 1);
_php_curl_cleanup_handle(ch);
error = curl_easy_perform... | 0 | [] | php-src | 124fb22a13fafa3648e4e15b4f207c7096d8155e | 44,206,214,377,192,430,000,000,000,000,000,000,000 | 51 | Fixed bug #68739 #68740 #68741 |
CImg<T>& distance(const T& value, const unsigned int metric=2) {
if (is_empty()) return *this;
if (cimg::type<Tint>::string()!=pixel_type()) // For datatype < int
return CImg<Tint>(*this,false).distance((Tint)value,metric).
cut((Tint)cimg::type<T>::min(),(Tint)cimg::type<T>::max()).mov... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 298,434,555,982,624,380,000,000,000,000,000,000,000 | 16 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
server_inline (server *serv, char *line, int len)
{
char *utf_line_allocated = NULL;
/* Checks whether we're set to use UTF-8 charset */
if (serv->using_irc || /* 1. using CP1252/UTF-8 Hybrid */
(serv->encoding == NULL && prefs.utf8_locale) || /* OR 2. using system default->UTF-8 */
(serv->encoding != NUL... | 0 | [
"CWE-310"
] | hexchat | c9b63f7f9be01692b03fa15275135a4910a7e02d | 49,091,241,169,980,285,000,000,000,000,000,000,000 | 98 | ssl: Validate hostnames
Closes #524 |
void Compute(OpKernelContext* context) override {
OpInputList indices_list_in;
OP_REQUIRES_OK(context, context->input_list("indices", &indices_list_in));
OpInputList values_list_in;
OP_REQUIRES_OK(context, context->input_list("values", &values_list_in));
OpInputList shapes_list_in;
OP_REQUIRES... | 1 | [
"CWE-843"
] | tensorflow | b1cc5e5a50e7cee09f2c6eb48eb40ee9c4125025 | 206,721,631,902,308,900,000,000,000,000,000,000,000 | 63 | Fix `tf.raw_ops.SparseCross` failing CHECK.
PiperOrigin-RevId: 368701671
Change-Id: Id805729dd9ba0bda36e4bb309408129b55fb649d |
static inline void set_system_gate(unsigned int n, void *addr)
{
BUG_ON((unsigned)n > 0xFF);
#ifdef CONFIG_X86_32
_set_gate(n, GATE_TRAP, addr, 0x3, 0, __KERNEL_CS);
#else
_set_gate(n, GATE_INTERRUPT, addr, 0x3, 0, __KERNEL_CS);
#endif
} | 0 | [
"CWE-119"
] | linux-2.6 | 5ac37f87ff18843aabab84cf75b2f8504c2d81fe | 4,141,226,704,768,637,700,000,000,000,000,000,000 | 9 | x86: fix ldt limit for 64 bit
Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu> |
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) {
TF_LITE_ENSURE_EQ(context, NumInputs(node), 2);
TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1);
const TfLiteTensor* dims;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kDimsTensor, &dims));
const TfLiteTensor* value;
TF_LITE_ENSURE_... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 159,583,187,852,607,020,000,000,000,000,000,000,000 | 31 | [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... |
show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
{
struct mm_struct *mm = vma->vm_mm;
struct file *file = vma->vm_file;
struct proc_maps_private *priv = m->private;
vm_flags_t flags = vma->vm_flags;
unsigned long ino = 0;
unsigned long long pgoff = 0;
unsigned long start, end;
dev_t dev ... | 1 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 201,730,741,398,013,700,000,000,000,000,000,000,000 | 78 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static int apparmor_path_truncate(const struct path *path)
{
return common_perm_path(OP_TRUNC, path, MAY_WRITE | AA_MAY_META_WRITE);
} | 0 | [
"CWE-119",
"CWE-264",
"CWE-369"
] | linux | 30a46a4647fd1df9cf52e43bf467f0d9265096ca | 227,010,605,097,213,050,000,000,000,000,000,000,000 | 4 | apparmor: fix oops, validate buffer size in apparmor_setprocattr()
When proc_pid_attr_write() was changed to use memdup_user apparmor's
(interface violating) assumption that the setprocattr buffer was always
a single page was violated.
The size test is not strictly speaking needed as proc_pid_attr_write()
will reject... |
proxy_C_Digest (CK_X_FUNCTION_LIST *self,
CK_SESSION_HANDLE handle,
CK_BYTE_PTR input,
CK_ULONG input_len,
CK_BYTE_PTR digest,
CK_ULONG_PTR digest_len)
{
State *state = (State *)self;
Mapping map;
CK_RV rv;
rv = map_session_to_real (st... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 298,728,413,090,505,520,000,000,000,000,000,000,000 | 16 | Check for arithmetic overflows before allocating |
struct sock *udp6_lib_lookup_skb(struct sk_buff *skb,
__be16 sport, __be16 dport)
{
const struct ipv6hdr *iph = ipv6_hdr(skb);
return __udp6_lib_lookup(dev_net(skb->dev), &iph->saddr, sport,
&iph->daddr, dport, inet6_iif(skb),
&udp_table, skb);
} | 0 | [] | linux | a612769774a30e4fc143c4cb6395c12573415660 | 134,469,137,918,110,250,000,000,000,000,000,000,000 | 9 | udp: prevent bugcheck if filter truncates packet too much
If socket filter truncates an udp packet below the length of UDP header
in udpv6_queue_rcv_skb() or udp_queue_rcv_skb(), it will trigger a
BUG_ON in skb_pull_rcsum(). This BUG_ON (and therefore a system crash if
kernel is configured that way) can be easily enfo... |
static void cmd_save(const char *data)
{
GSList *tmp;
GHashTable *optlist;
void *free_arg;
char *fname;
int saveall;
if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS,
"save", &optlist, &fname))
return;
saveall = g_hash_table_lookup(optlist, "formats") != NULL;
for (tmp... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 280,191,956,337,698,500,000,000,000,000,000,000,000 | 21 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
GF_Err extr_box_dump(GF_Box *a, FILE * trace)
{
GF_ExtraDataBox *ptr = (GF_ExtraDataBox *) a;
if (!a) return GF_BAD_PARAM;
gf_isom_box_dump_start(a, "ExtraDataBox", trace);
dump_data_attribute(trace, "data", ptr->data, ptr->data_length);
gf_fprintf(trace, ">\n");
if (ptr->feci)
gf_isom_box_dump(ptr->feci, trace... | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 211,906,373,111,582,580,000,000,000,000,000,000,000 | 12 | fixed #2138 |
static ssize_t bad_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
return -EIO;
} | 0 | [] | linux-2.6 | be6aab0e9fa6d3c6d75aa1e38ac972d8b4ee82b8 | 141,876,644,247,375,410,000,000,000,000,000,000,000 | 5 | [PATCH] fix memory corruption from misinterpreted bad_inode_ops return values
CVE-2006-5753 is for a case where an inode can be marked bad, switching
the ops to bad_inode_ops, which are all connected as:
static int return_EIO(void)
{
return -EIO;
}
#define EIO_ERROR ((void *) (return_EIO))
static struct ino... |
static struct ldb_dn *ldb_kv_index_key(struct ldb_context *ldb,
TALLOC_CTX *mem_ctx,
struct ldb_kv_private *ldb_kv,
const char *attr,
const struct ldb_val *value,
const struct ldb_schema_attribute **ap,
enum key_truncation *truncation)
{
struct ldb_dn *... | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 336,769,376,605,906,380,000,000,000,000,000,000,000 | 209 | 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... |
static bool page_fault_handle_page_track(struct kvm_vcpu *vcpu,
struct kvm_page_fault *fault)
{
if (unlikely(fault->rsvd))
return false;
if (!fault->present || !fault->write)
return false;
/*
* guest is writing the page which is write tracked which can
* not be fixed by page fault handler.
*/
if (... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 201,379,924,899,638,200,000,000,000,000,000,000,000 | 18 | 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... |
int gg_image_request(struct gg_session *sess, uin_t recipient, int size, uint32_t crc32)
{
struct gg_send_msg s;
struct gg_msg_image_request r;
char dummy = 0;
int res;
gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_image_request(%p, %d, %u, 0x%.4x);\n", sess, recipient, size, crc32);
if (!sess) {
errno = E... | 0 | [
"CWE-310"
] | libgadu | 23644f1fb8219031b3cac93289a588b05f90226b | 262,294,249,685,525,700,000,000,000,000,000,000,000 | 72 | Poprawka ograniczania długości opisu. |
static int download_code(struct edgeport_serial *serial, __u8 *image,
int image_length)
{
int status = 0;
int pos;
int transfer;
int done;
/* Transfer firmware image */
for (pos = 0; pos < image_length; ) {
/* Read the next buffer from file */
transfer = image_length - pos;
if (transfer > EDGE_FW_BU... | 0 | [
"CWE-191"
] | linux | 654b404f2a222f918af9b0cd18ad469d0c941a8e | 15,987,706,554,688,180,000,000,000,000,000,000,000 | 26 | USB: serial: io_ti: fix information leak in completion handler
Add missing sanity check to the bulk-in completion handler to avoid an
integer underflow that can be triggered by a malicious device.
This avoids leaking 128 kB of memory content from after the URB transfer
buffer to user space.
Fixes: 8c209e6782ca ("USB... |
int meth_proppatch(struct transaction_t *txn, void *params)
{
struct meth_params *pparams = (struct meth_params *) params;
int ret = 0, r = 0;
xmlDocPtr indoc = NULL, outdoc = NULL;
xmlNodePtr root, instr, resp;
xmlNsPtr ns[NUM_NAMESPACE];
struct mailbox *mailbox = NULL;
struct proppatch_ctx... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 132,225,655,675,850,210,000,000,000,000,000,000,000 | 140 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
static void oidc_copy_tokens_to_request_state(request_rec *r,
oidc_session_t *session, const char **s_id_token, const char **s_claims) {
const char *id_token = oidc_session_get_idtoken_claims(r, session);
const char *claims = oidc_session_get_userinfo_claims(r, session);
oidc_debug(r, "id_token=%s claims=%s", id... | 0 | [
"CWE-601"
] | mod_auth_openidc | 5c15dfb08106c2451c2c44ce7ace6813c216ba75 | 103,120,587,971,721,840,000,000,000,000,000,000,000 | 20 | improve validation of the post-logout URL; closes #449
- to avoid an open redirect; thanks AIMOTO Norihito
- release 2.4.0.1
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
ExpressionRegex::RegexExecutionState ExpressionRegex::buildInitialState(
const Document& root, Variables* variables) const {
Value textInput = _input->evaluate(root, variables);
Value regexPattern = _regex->evaluate(root, variables);
Value regexOptions = _options ? _options->evaluate(root, variables) : ... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 132,871,981,700,186,160,000,000,000,000,000,000,000 | 21 | SERVER-49404 Enforce additional checks in $arrayToObject |
qemuProcessSetupHotpluggableVcpus(virQEMUDriverPtr driver,
virDomainObjPtr vm,
qemuDomainAsyncJob asyncJob)
{
unsigned int maxvcpus = virDomainDefGetVcpusMax(vm->def);
qemuDomainObjPrivatePtr priv = vm->privateData;
qemuCgroupEmulatorAllNod... | 0 | [
"CWE-416"
] | libvirt | 1ac703a7d0789e46833f4013a3876c2e3af18ec7 | 242,563,049,727,777,720,000,000,000,000,000,000,000 | 70 | qemu: Add missing lock in qemuProcessHandleMonitorEOF
qemuMonitorUnregister will be called in multiple threads (e.g. threads
in rpc worker pool and the vm event thread). In some cases, it isn't
protected by the monitor lock, which may lead to call g_source_unref
more than one time and a use-after-free problem eventua... |
ar6000_scanComplete_event(struct ar6_softc *ar, int status)
{
ar6k_cfg80211_scanComplete_event(ar, status);
if (!ar->arUserBssFilter) {
wmi_bssfilter_cmd(ar->arWmi, NONE_BSS_FILTER, 0);
}
if (ar->scan_triggered) {
if (status== 0) {
union iwreq_data wrqu;
A_MEMZE... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 168,745,581,633,733,950,000,000,000,000,000,000,000 | 19 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
static int rsi_send_w9116_features(struct rsi_common *common)
{
struct rsi_wlan_9116_features *w9116_features;
u16 frame_len = sizeof(struct rsi_wlan_9116_features);
struct sk_buff *skb;
rsi_dbg(MGMT_TX_ZONE,
"%s: Sending wlan 9116 features\n", __func__);
skb = dev_alloc_skb(frame_len);
if (!skb)
return -EN... | 0 | [
"CWE-400",
"CWE-401"
] | linux | d563131ef23cbc756026f839a82598c8445bc45f | 48,799,124,124,818,220,000,000,000,000,000,000,000 | 40 | rsi: release skb if rsi_prepare_beacon fails
In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
static int blob_content_to_link(
checkout_data *data,
struct stat *st,
git_blob *blob,
const char *path)
{
git_buf linktarget = GIT_BUF_INIT;
int error;
if ((error = mkpath2file(data, path, data->opts.dir_mode)) < 0)
return error;
if ((error = git_blob__getbuf(&linktarget, blob)) < 0)
return error;
if (... | 0 | [
"CWE-20",
"CWE-706"
] | libgit2 | 64c612cc3e25eff5fb02c59ef5a66ba7a14751e4 | 294,790,956,216,470,970,000,000,000,000,000,000,000 | 35 | 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).
... |
clusterip_config_entry_put(struct clusterip_config *c)
{
local_bh_disable();
if (atomic_dec_and_lock(&c->entries, &clusterip_lock)) {
list_del_rcu(&c->list);
spin_unlock(&clusterip_lock);
local_bh_enable();
dev_mc_del(c->dev, c->clustermac);
dev_put(c->dev);
/* In case anyone still accesses the file, th... | 0 | [
"CWE-120"
] | linux-2.6 | 961ed183a9fd080cf306c659b8736007e44065a5 | 236,145,534,442,998,760,000,000,000,000,000,000,000 | 21 | netfilter: ipt_CLUSTERIP: fix buffer overflow
'buffer' string is copied from userspace. It is not checked whether it is
zero terminated. This may lead to overflow inside of simple_strtoul().
Changli Gao suggested to copy not more than user supplied 'size' bytes.
It was introduced before the git epoch. Files "ipt_C... |
void LinkResolver::resolve_field(fieldDescriptor& fd,
const LinkInfo& link_info,
Bytecodes::Code byte, bool initialize_class,
TRAPS) {
assert(byte == Bytecodes::_getstatic || byte == Bytecodes::_putstatic ||
by... | 0 | [] | jdk11u | 132745902a4601dc64b2c8ca112ca30292feccb4 | 250,768,997,050,422,400,000,000,000,000,000,000,000 | 97 | 8281866: Enhance MethodHandle invocations
Reviewed-by: mbaesken
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
iperf_set_test_state(struct iperf_test *ipt, signed char state)
{
ipt->state = state;
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 30,039,067,215,960,537,000,000,000,000,000,000,000 | 4 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
static int rsi_mac80211_set_rate_mask(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
const struct cfg80211_bitrate_mask *mask)
{
struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv;
enum nl80211_band band = hw->conf.chandef.chan->band;
mutex_lock(&common->mutex);
... | 0 | [
"CWE-416"
] | linux | abd39c6ded9db53aa44c2540092bdd5fb6590fa8 | 81,548,654,714,134,730,000,000,000,000,000,000,000 | 22 | rsi: add fix for crash during assertions
Observed crash in some scenarios when assertion has occurred,
this is because hw structure is freed and is tried to get
accessed in some functions where null check is already
present. So, avoided the crash by making the hw to NULL after
freeing.
Signed-off-by: Sanjay Konduri <... |
GF_Err tfdt_box_write(GF_Box *s, GF_BitStream *bs)
{
GF_Err e;
GF_TFBaseMediaDecodeTimeBox *ptr = (GF_TFBaseMediaDecodeTimeBox *) s;
e = gf_isom_full_box_write(s, bs);
if (e) return e;
if (ptr->version==1) {
gf_bs_write_u64(bs, ptr->baseMediaDecodeTime);
} else {
gf_bs_write_u32(bs, (u32) ptr->baseMediaDecod... | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 147,231,959,980,010,680,000,000,000,000,000,000,000 | 14 | fixed #2255 |
TIFFReadBufferSetup(TIFF* tif, void* bp, tmsize_t size)
{
static const char module[] = "TIFFReadBufferSetup";
assert((tif->tif_flags&TIFF_NOREADRAW)==0);
tif->tif_flags &= ~TIFF_BUFFERMMAP;
if (tif->tif_rawdata) {
if (tif->tif_flags & TIFF_MYBUFFER)
_TIFFfree(tif->tif_rawdata);
tif->tif_rawdata = NULL;
t... | 1 | [
"CWE-119"
] | libtiff | d60332057b9575ada4f264489582b13e30137be1 | 224,275,207,311,100,900,000,000,000,000,000,000,000 | 36 | * libtiff/tiffiop.h, tif_unix.c, tif_win32.c, tif_vms.c: add _TIFFcalloc()
* libtiff/tif_read.c: TIFFReadBufferSetup(): use _TIFFcalloc() to zero
initialize tif_rawdata.
Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2651 |
static inline Quantum ScaleXToQuantum(const size_t x,
const size_t scale)
{
return((Quantum) (((MagickRealType) QuantumRange*x)/scale+0.5));
} | 0 | [
"CWE-401"
] | ImageMagick6 | 13801f5d0bd7a6fdb119682d34946636afdb2629 | 236,077,606,528,106,200,000,000,000,000,000,000,000 | 5 | https://github.com/ImageMagick/ImageMagick/issues/1531 |
void DcmSCP::forceAssociationRefuse(const OFBool doRefuse)
{
m_cfg->forceAssociationRefuse(doRefuse);
} | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 47,788,980,197,273,490,000,000,000,000,000,000,000 | 4 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
int zslValueGteMin(double value, zrangespec *spec) {
return spec->minex ? (value > spec->min) : (value >= spec->min);
} | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 88,718,024,125,380,770,000,000,000,000,000,000,000 | 3 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
AltsIntegrationTestCapturingHandshaker()
: AltsIntegrationTestBase("", "",
/* server_connect_handshaker */ true,
/* client_connect_handshaker */ true,
/* capturing_handshaker */ true) {} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 165,630,312,054,820,860,000,000,000,000,000,000,000 | 5 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
TEST(IndexBoundsBuilderTest, TranslateGTStringWithMockCollator) {
CollatorInterfaceMock collator(CollatorInterfaceMock::MockType::kReverseString);
auto testIndex = buildSimpleIndexEntry();
testIndex.collator = &collator;
BSONObj obj = fromjson("{a: {$gt: 'foo'}}");
auto expr = parseMatchExpression(... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 128,404,288,581,669,720,000,000,000,000,000,000,000 | 20 | SERVER-44377 generate correct plan for indexed inequalities to null |
static inline int is_si_special(const struct siginfo *info)
{
return info <= SEND_SIG_FORCED;
} | 0 | [] | linux-2.6 | da48524eb20662618854bb3df2db01fc65f3070c | 182,746,382,194,353,950,000,000,000,000,000,000,000 | 4 | Prevent rt_sigqueueinfo and rt_tgsigqueueinfo from spoofing the signal code
Userland should be able to trust the pid and uid of the sender of a
signal if the si_code is SI_TKILL.
Unfortunately, the kernel has historically allowed sigqueueinfo() to
send any si_code at all (as long as it was negative - to distinguish i... |
int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx)
{
int i, j, bits, ret = 0, wstart, wend, window, wvalue;
int start = 1;
BIGNUM *aa;
/* Table of variables obtained from 'ctx' */
BIGNUM *val[TABLE_SIZE];
BN_RECP_CTX recp;
if (... | 0 | [
"CWE-200"
] | openssl | d6482a82bc2228327aa4ba98aeeecd9979542a31 | 304,215,242,600,907,620,000,000,000,000,000,000,000 | 132 | bn/bn_exp.c: constant-time MOD_EXP_CTIME_COPY_FROM_PREBUF.
Performance penalty varies from platform to platform, and even
key length. For rsa2048 sign it was observed to reach almost 10%.
CVE-2016-0702
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org> |
iperf_set_test_reporter_interval(struct iperf_test *ipt, double reporter_interval)
{
ipt->reporter_interval = reporter_interval;
} | 0 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 176,243,095,504,127,460,000,000,000,000,000,000,000 | 4 | Fix a buffer overflow / heap corruption issue that could occur if a
malformed JSON string was passed on the control channel. This issue,
present in the cJSON library, was already fixed upstream, so was
addressed here in iperf3 by importing a newer version of cJSON (plus
local ESnet modifications).
Discovered and repo... |
static int chap_server_compute_md5(
struct iscsi_conn *conn,
struct iscsi_node_auth *auth,
char *nr_in_ptr,
char *nr_out_ptr,
unsigned int *nr_out_len)
{
unsigned long id;
unsigned char id_as_uchar;
unsigned char digest[MD5_SIGNATURE_SIZE];
unsigned char type, response[MD5_SIGNATURE_SIZE * 2 + 2];
unsigned ch... | 0 | [] | linux | 8c39e2699f8acb2e29782a834e56306da24937fe | 115,068,824,186,470,910,000,000,000,000,000,000,000 | 262 | scsi: target: iscsi: Use bin2hex instead of a re-implementation
Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Reviewed-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> |
irc_nick_add_to_infolist (struct t_infolist *infolist,
struct t_irc_nick *nick)
{
struct t_infolist_item *ptr_item;
if (!infolist || !nick)
return 0;
ptr_item = weechat_infolist_new_item (infolist);
if (!ptr_item)
return 0;
if (!weechat_infolist_new_var_s... | 0 | [
"CWE-120",
"CWE-787"
] | weechat | 40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f | 190,279,621,884,950,050,000,000,000,000,000,000,000 | 31 | irc: fix crash when a new message 005 is received with longer nick prefixes
Thanks to Stuart Nevans Locke for reporting the issue. |
long long Cluster::GetTimeCode() const {
long long pos;
long len;
const long status = Load(pos, len);
if (status < 0) // error
return status;
return m_timecode;
} | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 184,061,541,898,461,170,000,000,000,000,000,000,000 | 11 | 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 |
TfLiteRegistration* Register_WHILE() {
static TfLiteRegistration r = {while_kernel::Init, while_kernel::Free,
while_kernel::Prepare, while_kernel::Eval};
return &r;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 256,904,645,465,597,120,000,000,000,000,000,000,000 | 5 | [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... |
static int pick_link(struct nameidata *nd, struct path *link,
struct inode *inode, unsigned seq)
{
int error;
struct saved *last;
if (unlikely(nd->total_link_count++ >= MAXSYMLINKS)) {
path_to_nameidata(link, nd);
return -ELOOP;
}
if (!(nd->flags & LOOKUP_RCU)) {
if (link->mnt == nd->path.mnt)
mntg... | 0 | [
"CWE-254"
] | linux | 397d425dc26da728396e66d392d5dcb8dac30c37 | 245,562,679,744,190,500,000,000,000,000,000,000,000 | 33 | vfs: Test for and handle paths that are unreachable from their mnt_root
In rare cases a directory can be renamed out from under a bind mount.
In those cases without special handling it becomes possible to walk up
the directory tree to the root dentry of the filesystem and down
from the root dentry to every other file ... |
end_write(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
bool end_of_records)
{
TABLE *const table= join_tab->table;
DBUG_ENTER("end_write");
if (!end_of_records)
{
copy_fields(join_tab->tmp_table_param);
if (copy_funcs(join_tab->tmp_table_param->items_to_copy, join->thd))
DBUG_RETURN... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 289,833,267,236,640,400,000,000,000,000,000,000,000 | 48 | 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... |
void CZNC::UnforceEncoding() { m_uiForceEncoding--; } | 0 | [
"CWE-20"
] | znc | 64613bc8b6b4adf1e32231f9844d99cd512b8973 | 140,315,357,897,988,900,000,000,000,000,000,000,000 | 1 | Don't crash if user specified invalid encoding.
This is CVE-2019-9917 |
void OSDService::remove_want_pg_temp(pg_t pgid)
{
Mutex::Locker l(pg_temp_lock);
pg_temp_wanted.erase(pgid);
pg_temp_pending.erase(pgid);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 180,401,154,273,710,270,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 ... |
void tcp_free_fastopen_req(struct tcp_sock *tp)
{
if (tp->fastopen_req) {
kfree(tp->fastopen_req);
tp->fastopen_req = NULL;
}
} | 0 | [
"CWE-399",
"CWE-835"
] | linux | ccf7abb93af09ad0868ae9033d1ca8108bdaec82 | 299,553,185,871,912,450,000,000,000,000,000,000,000 | 7 | tcp: avoid infinite loop in tcp_splice_read()
Splicing from TCP socket is vulnerable when a packet with URG flag is
received and stored into receive queue.
__tcp_splice_read() returns 0, and sk_wait_data() immediately
returns since there is the problematic skb in queue.
This is a nice way to burn cpu (aka infinite l... |
static int cover_add(cover, beg, end)
cover_t *cover;
bound_t beg;
bound_t end;
{
size_t pos;
int prec, foll;
if (beg >= end)
/* The new span is invalid. */
return -1;
/* Find where the new span should go, and make sure that it does not
overlap with any existing spans. *... | 0 | [
"CWE-400"
] | unzip | 47b3ceae397d21bf822bc2ac73052a4b1daf8e1c | 91,991,773,771,730,440,000,000,000,000,000,000,000 | 58 | Detect and reject a zip bomb using overlapped entries.
This detects an invalid zip file that has at least one entry that
overlaps with another entry or with the central directory to the
end of the file. A Fifield zip bomb uses overlapped local entries
to vastly increase the potential inflation ratio. Such an invalid
z... |
d_lite_jisx0301(VALUE self)
{
char fmtbuf[JISX0301_DATE_SIZE];
const char *fmt;
get_d1(self);
fmt = jisx0301_date_format(fmtbuf, sizeof(fmtbuf),
m_real_local_jd(dat),
m_real_year(dat));
return strftimev(fmt, self, set_tmx);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 187,996,979,281,767,640,000,000,000,000,000,000,000 | 11 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
MakeValue(const NamedArgWithType<Char_, T> &value) { pointer = &value; } | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 85,225,338,152,738,960,000,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
long arch_ptrace(struct task_struct *child, long request,
unsigned long addr, unsigned long data)
{
int ret = -EPERM;
void __user *datavp = (void __user *) data;
unsigned long __user *datalp = datavp;
switch (request) {
/* read the word at location addr in the USER area. */
case PTRACE_PEEKUSR: {
unsigned l... | 0 | [
"CWE-284",
"CWE-120"
] | linux | 8e1278444446fc97778a5e5c99bca1ce0bbc5ec9 | 258,697,290,987,231,900,000,000,000,000,000,000,000 | 157 | powerpc/32: Fix overread/overwrite of thread_struct via ptrace
The ptrace PEEKUSR/POKEUSR (aka PEEKUSER/POKEUSER) API allows a process
to read/write registers of another process.
To get/set a register, the API takes an index into an imaginary address
space called the "USER area", where the registers of the process ar... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.