func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void DL_Dxf::writeMText(DL_WriterA& dw,
const DL_MTextData& data,
const DL_Attributes& attrib) {
dw.entity("MTEXT");
if (version==DL_VERSION_2000) {
dw.dxfString(100, "AcDbEntity");
}
dw.entityAttributes(attrib);
if (version==DL_VERSION_2000) ... | 0 | [
"CWE-191"
] | qcad | 1eeffc5daf5a06cf6213ffc19e95923cdebb2eb8 | 308,254,908,000,571,500,000,000,000,000,000,000,000 | 42 | check vertexIndex which might be -1 for broken DXF |
unsigned long long sendSync(int fd) {
/* To start we need to send the SYNC command and return the payload.
* The hiredis client lib does not understand this part of the protocol
* and we don't want to mess with its buffers, so everything is performed
* using direct low-level I/O. */
char buf[4096... | 0 | [
"CWE-119",
"CWE-787"
] | redis | 9fdcc15962f9ff4baebe6fdd947816f43f730d50 | 289,408,859,585,204,040,000,000,000,000,000,000,000 | 32 | Security: fix redis-cli buffer overflow.
Thanks to Fakhri Zulkifli for reporting it.
The fix switched to dynamic allocation, copying the final prompt in the
static buffer only at the end. |
NO_INLINE JsVar *jspeFactor() {
if (lex->tk==LEX_ID) {
JsVar *a = jspGetNamedVariable(jslGetTokenValueAsString());
JSP_ASSERT_MATCH(LEX_ID);
#ifndef SAVE_ON_FLASH
if (lex->tk==LEX_TEMPLATE_LITERAL)
jsExceptionHere(JSET_SYNTAXERROR, "Tagged template literals not supported");
else if (lex->tk==LEX... | 0 | [
"CWE-787"
] | Espruino | e069be2ecc5060ef47391716e4de94999595b260 | 211,537,163,869,672,900,000,000,000,000,000,000,000 | 165 | Fix potential corruption issue caused by `delete [].__proto__` (fix #2142) |
static MagickBooleanType WritePCDImage(const ImageInfo *image_info,Image *image)
{
Image
*pcd_image;
MagickBooleanType
status;
register ssize_t
i;
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickCoreSignature);
assert(image != (Image *) NULL);
assert(im... | 0 | [
"CWE-772"
] | ImageMagick6 | e8f4f5e776002aa6ed490d7c6f65e10fa67359dd | 297,257,138,934,404,980,000,000,000,000,000,000,000 | 89 | https://github.com/ImageMagick/ImageMagick/issues/1193 |
static MagickBooleanType ReadPSDChannelZip(Image *image,const size_t channels,
const ssize_t type,const PSDCompressionType compression,
const size_t compact_size,ExceptionInfo *exception)
{
MagickBooleanType
status;
register unsigned char
*p;
size_t
count,
length,
packet_size,
row_si... | 0 | [
"CWE-125"
] | ImageMagick6 | 4745eb1047617330141e9abfd5ae01236a71ae12 | 240,666,112,831,110,620,000,000,000,000,000,000,000 | 124 | https://github.com/ImageMagick/ImageMagick/issues/1249 |
controls_destroy( void )
{
struct slap_control *sc;
while ( !LDAP_SLIST_EMPTY(&controls_list) ) {
sc = LDAP_SLIST_FIRST(&controls_list);
LDAP_SLIST_REMOVE_HEAD(&controls_list, sc_next);
ch_free( sc->sc_oid );
if ( sc->sc_extendedopsbv != NULL ) {
ber_bvarray_free( sc->sc_extendedopsbv );
}
ch_free( s... | 0 | [
"CWE-125"
] | openldap | 21981053a1195ae1555e23df4d9ac68d34ede9dd | 215,033,177,138,392,280,000,000,000,000,000,000,000 | 15 | ITS#9408 fix vrfilter double-free |
ofpacts_execute_action_set(struct ofpbuf *action_list,
const struct ofpbuf *action_set)
{
const struct ofpact *slots[N_ACTION_SLOTS] = {NULL, };
struct ofpbuf set_or_move;
ofpbuf_init(&set_or_move, 0);
const struct ofpact *final_action = NULL;
enum action_set_class final... | 0 | [
"CWE-416"
] | ovs | 77cccc74deede443e8b9102299efc869a52b65b2 | 337,686,804,167,644,530,000,000,000,000,000,000,000 | 39 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
dma_set_tx_state(struct dma_tx_state *st, dma_cookie_t last, dma_cookie_t used, u32 residue)
{
if (st) {
st->last = last;
st->used = used;
st->residue = residue;
}
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 76,536,500,195,960,990,000,000,000,000,000,000,000 | 8 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
print_ipcp_constant_value (FILE * f, tree v)
{
if (TREE_CODE (v) == ADDR_EXPR
&& TREE_CODE (TREE_OPERAND (v, 0)) == CONST_DECL)
{
fprintf (f, "& ");
print_generic_expr (f, DECL_INITIAL (TREE_OPERAND (v, 0)));
}
else
print_generic_expr (f, v);
} | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 293,345,210,046,739,900,000,000,000,000,000,000,000 | 11 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
static void check_serverpath(request_rec *r)
{
server_rec *s;
server_rec *last_s;
name_chain *src;
apr_port_t port;
port = r->connection->local_addr->port;
/*
* This is in conjunction with the ServerPath code in http_core, so we
* get the right host attached to a non- Host-sending re... | 1 | [] | httpd | ecebcc035ccd8d0e2984fe41420d9e944f456b3c | 257,905,521,359,903,420,000,000,000,000,000,000,000 | 41 | Merged r1734009,r1734231,r1734281,r1838055,r1838079,r1840229,r1876664,r1876674,r1876784,r1879078,r1881620,r1887311,r1888871 from trunk:
*) core: Split ap_create_request() from ap_read_request(). [Graham Leggett]
*) core, h2: common ap_parse_request_line() and ap_check_request_header()
code. [Yann Ylavic]
... |
static void __init xen_banner(void)
{
unsigned version = HYPERVISOR_xen_version(XENVER_version, NULL);
struct xen_extraversion extra;
HYPERVISOR_xen_version(XENVER_extraversion, &extra);
pr_info("Booting paravirtualized kernel on %s\n", pv_info.name);
printk(KERN_INFO "Xen version: %d.%d%s%s\n",
version >... | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 309,345,232,915,013,800,000,000,000,000,000,000,000 | 19 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
ldns_rr_list_cat(ldns_rr_list *left, ldns_rr_list *right)
{
size_t r_rr_count;
size_t i;
if (!left) {
return false;
}
if (right) {
r_rr_count = ldns_rr_list_rr_count(right);
} else {
r_rr_count = 0;
}
/* push right to left */
for(i = 0; i < r_rr_count; i++) {
ldns_rr_list_push_rr(left, ldns_rr_list_... | 0 | [
"CWE-415"
] | ldns | 070b4595981f48a21cc6b4f5047fdc2d09d3da91 | 132,660,227,322,049,060,000,000,000,000,000,000,000 | 21 | CAA and URI |
static int set_ctxt_pkey(struct hfi1_ctxtdata *uctxt, unsigned long arg)
{
int i;
struct hfi1_pportdata *ppd = uctxt->ppd;
struct hfi1_devdata *dd = uctxt->dd;
u16 pkey;
if (!HFI1_CAP_IS_USET(PKEY_CHECK))
return -EPERM;
if (get_user(pkey, (u16 __user *)arg))
return -EFAULT;
if (pkey == LIM_MGMT_P_KEY || p... | 0 | [
"CWE-416"
] | linux | 3d2a9d642512c21a12d19b9250e7a835dcb41a79 | 239,976,446,071,616,500,000,000,000,000,000,000,000 | 22 | IB/hfi1: Ensure correct mm is used at all times
Two earlier bug fixes have created a security problem in the hfi1
driver. One fix aimed to solve an issue where current->mm was not valid
when closing the hfi1 cdev. It attempted to do this by saving a cached
value of the current->mm pointer at file open time. This is a ... |
xmlStaticCopyNode(xmlNodePtr node, xmlDocPtr doc, xmlNodePtr parent,
int extended) {
xmlNodePtr ret;
if (node == NULL) return(NULL);
switch (node->type) {
case XML_TEXT_NODE:
case XML_CDATA_SECTION_NODE:
case XML_ELEMENT_NODE:
case XML_DOCUMENT_FRAG_NODE:
... | 0 | [
"CWE-190"
] | libxml2 | 6c283d83eccd940bcde15634ac8c7f100e3caefd | 73,699,312,876,514,650,000,000,000,000,000,000,000 | 197 | [CVE-2022-29824] Fix integer overflows in xmlBuf and xmlBuffer
In several places, the code handling string buffers didn't check for
integer overflow or used wrong types for buffer sizes. This could
result in out-of-bounds writes or other memory errors when working on
large, multi-gigabyte buffers.
Thanks to Felix Wil... |
static int __init blk_mq_init(void)
{
blk_mq_cpu_init();
hotcpu_notifier(blk_mq_queue_reinit_notify, 0);
return 0;
} | 0 | [
"CWE-362",
"CWE-264"
] | linux | 0048b4837affd153897ed1222283492070027aa9 | 79,568,996,209,317,670,000,000,000,000,000,000,000 | 8 | blk-mq: fix race between timeout and freeing request
Inside timeout handler, blk_mq_tag_to_rq() is called
to retrieve the request from one tag. This way is obviously
wrong because the request can be freed any time and some
fiedds of the request can't be trusted, then kernel oops
might be triggered[1].
Currently wrt. ... |
nfs4_listxattr_nfs4_label(struct inode *inode, char *list, size_t list_len)
{
int len = 0;
if (nfs_server_capable(inode, NFS_CAP_SECURITY_LABEL)) {
len = security_inode_listsecurity(inode, list, list_len);
if (list_len && len > list_len)
return -ERANGE;
}
return len;
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 89,923,353,783,210,400,000,000,000,000,000,000,000 | 11 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static inline int empty_stack(void)
{
return gc_current == GC_HEAD;
} | 1 | [] | linux-2.6 | 1fd05ba5a2f2aa8e7b9b52ef55df850e2e7d54c9 | 142,163,827,764,239,930,000,000,000,000,000,000,000 | 4 | [AF_UNIX]: Rewrite garbage collector, fixes race.
Throw out the old mark & sweep garbage collector and put in a
refcounting cycle detecting one.
The old one had a race with recvmsg, that resulted in false positives
and hence data loss. The old algorithm operated on all unix sockets
in the system, so any additional l... |
void Compute(OpKernelContext *ctx) override {
// (0) validations
const Tensor *a_indices, *b_indices, *a_values_t, *b_values_t, *a_shape,
*b_shape, *thresh_t;
OP_REQUIRES_OK(ctx, ctx->input("a_indices", &a_indices));
OP_REQUIRES_OK(ctx, ctx->input("b_indices", &b_indices));
OP_REQUIRES(ct... | 1 | [
"CWE-369",
"CWE-787"
] | tensorflow | 6fd02f44810754ae7481838b6a67c5df7f909ca3 | 3,930,653,515,421,810,400,000,000,000,000,000,000 | 137 | Fix `tf.raw_ops.SparseAdd ` invalid memory access failure.
PiperOrigin-RevId: 370568774
Change-Id: I5f73b31c865f2948a1c8dfb7ebd22b3cfb6405bf |
if(pvals == NULL) {
LogError(0, RS_RET_MISSING_CNFPARAMS, "imptcp: error processing module "
"config parameters [module(...)]");
ABORT_FINALIZE(RS_RET_MISSING_CNFPARAMS);
} | 0 | [
"CWE-787"
] | rsyslog | 89955b0bcb1ff105e1374aad7e0e993faa6a038f | 75,610,084,053,708,750,000,000,000,000,000,000,000 | 5 | net bugfix: potential buffer overrun |
time_t gnutls_x509_crt_get_activation_time(gnutls_x509_crt_t cert)
{
if (cert == NULL) {
gnutls_assert();
return (time_t) - 1;
}
return _gnutls_x509_get_time(cert->cert,
"tbsCertificate.validity.notBefore");
} | 0 | [] | gnutls | 112d537da5f3500f14316db26d18c37d678a5e0e | 238,272,209,693,415,500,000,000,000,000,000,000,000 | 10 | some changes for 64bit machines. |
static bool handle_client_startup(PgSocket *client, PktHdr *pkt)
{
const char *passwd;
const uint8_t *key;
bool ok;
SBuf *sbuf = &client->sbuf;
/* don't tolerate partial packets */
if (incomplete_pkt(pkt)) {
disconnect_client(client, true, "client sent partial pkt in startup phase");
return false;
}
if (... | 1 | [
"CWE-476"
] | pgbouncer | 74d6e5f7de5ec736f71204b7b422af7380c19ac5 | 154,901,004,900,156,750,000,000,000,000,000,000,000 | 94 | Check if auth_user is set.
Fixes a crash if password packet appears before startup packet (#42). |
static int arc_emac_tx(struct sk_buff *skb, struct net_device *ndev)
{
struct arc_emac_priv *priv = netdev_priv(ndev);
unsigned int len, *txbd_curr = &priv->txbd_curr;
struct net_device_stats *stats = &ndev->stats;
__le32 *info = &priv->txbd[*txbd_curr].info;
dma_addr_t addr;
if (skb_padto(skb, ETH_ZLEN))
retu... | 0 | [
"CWE-362"
] | linux | c278c253f3d992c6994d08aa0efb2b6806ca396f | 207,423,470,382,465,260,000,000,000,000,000,000,000 | 66 | net: arc_emac: fix koops caused by sk_buff free
There is a race between arc_emac_tx() and arc_emac_tx_clean().
sk_buff got freed by arc_emac_tx_clean() while arc_emac_tx()
submitting sk_buff.
In order to free sk_buff arc_emac_tx_clean() checks:
if ((info & FOR_EMAC) || !txbd->data)
break;
...
dev_... |
AirPDcapCleanSecAssoc(
PAIRPDCAP_CONTEXT ctx)
{
PAIRPDCAP_SEC_ASSOCIATION psa;
int i;
for (psa = ctx->sa, i = 0; i < AIRPDCAP_MAX_SEC_ASSOCIATIONS_NR; i++, psa++) {
/* To iterate is human, to recurse, divine */
AirPDcapRecurseCleanSA(psa);
}
} | 0 | [
"CWE-20"
] | wireshark | 9b0b20b8d5f8c9f7839d58ff6c5900f7e19283b4 | 87,256,006,345,548,850,000,000,000,000,000,000,000 | 11 | Make sure EAPOL body is big enough for a EAPOL_RSN_KEY.
A pointer to a EAPOL_RSN_KEY is set on the packet presuming the
whole EAPOL_RSN_KEY is there. That's not always the case for
fuzzed/malicious captures.
Bug: 11585
Change-Id: Ib94b8aceef444c7820e43b969596efdb8dbecccd
Reviewed-on: https://code.wireshark.org/revie... |
int jbd2_journal_get_undo_access(handle_t *handle, struct buffer_head *bh)
{
int err;
struct journal_head *jh;
char *committed_data = NULL;
if (is_handle_aborted(handle))
return -EROFS;
if (jbd2_write_access_granted(handle, bh, true))
return 0;
jh = jbd2_journal_add_journal_head(bh);
JBUFFER_TRACE(jh, "en... | 0 | [
"CWE-416"
] | linux | cc16eecae687912238ee6efbff71ad31e2bc414e | 14,347,911,920,347,794,000,000,000,000,000,000,000 | 50 | jbd2: fix use-after-free of transaction_t race
jbd2_journal_wait_updates() is called with j_state_lock held. But if
there is a commit in progress, then this transaction might get committed
and freed via jbd2_journal_commit_transaction() ->
jbd2_journal_free_transaction(), when we release j_state_lock.
So check for jou... |
static long dynamicTell (struct gdIOCtx *ctx)
{
dpIOCtx *dctx;
dctx = (dpIOCtx *) ctx;
return (dctx->dp->pos);
} | 0 | [
"CWE-119"
] | php-src | cc08cbc84d46933c1e9e0149633f1ed5d19e45e9 | 164,846,710,931,448,780,000,000,000,000,000,000,000 | 8 | Fix #73280: Stack Buffer Overflow in GD dynamicGetbuf
We make sure to never pass a negative `rlen` as size to memcpy().
Cf. <https://github.com/libgd/libgd/commit/53110871>. |
PHP_FUNCTION(bcadd)
{
char *left, *right;
long scale_param = 0;
bc_num first, second, result;
int left_len, right_len;
int scale = BCG(bc_precision), argc = ZEND_NUM_ARGS();
if (zend_parse_parameters(argc TSRMLS_CC, "ss|l", &left, &left_len, &right, &right_len, &scale_param) == FAILURE) {
return;
}
if (arg... | 1 | [
"CWE-20"
] | php-src | ed52bcb3dcb2e7dbc009ef8c6579fb1276ca73c1 | 239,779,901,455,243,320,000,000,000,000,000,000,000 | 35 | Fix bug #72093: bcpowmod accepts negative scale and corrupts _one_ definition
We can not modify result since it can be copy of _zero_ or _one_, etc. and
"copy" in bcmath is just bumping the refcount.
Conflicts:
main/php_version.h |
cleanup_handler(int sig)
{
cleanup_socket();
#ifdef ENABLE_PKCS11
pkcs11_terminate();
#endif
_exit(2);
} | 0 | [
"CWE-399",
"CWE-415"
] | openssh-portable | e04fd6dde16de1cdc5a4d9946397ff60d96568db | 218,241,587,426,054,730,000,000,000,000,000,000,000 | 8 | upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own
function and remove an unused variable; ok dtucker@
OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559 |
static int init_frame_decoder(APEContext *ctx)
{
int i, ret;
if ((ret = init_entropy_decoder(ctx)) < 0)
return ret;
init_predictor_decoder(ctx);
for (i = 0; i < APE_FILTER_LEVELS; i++) {
if (!ape_filter_orders[ctx->fset][i])
break;
init_filter(ctx, ctx->filters[i], c... | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 309,232,984,434,259,400,000,000,000,000,000,000,000 | 15 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
trace_normalized_cost(NCURSES_SP_DCLx const char *capname, const char *cap, int affcnt)
{
int result = normalized_cost(NCURSES_SP_ARGx cap, affcnt);
TR(TRACE_CHARPUT | TRACE_MOVE,
("NormalizedCost %s %d %s", capname, result, _nc_visbuf(cap)));
return result;
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 336,384,655,885,031,200,000,000,000,000,000,000,000 | 7 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
NOEXPORT int exec_connect_start(void) {
SERVICE_OPTIONS *opt;
for(opt=service_options.next; opt; opt=opt->next) {
if(opt->exec_name && opt->connect_addr.names) {
s_log(LOG_DEBUG, "Starting exec+connect service [%s]",
opt->servname);
#ifndef USE_FORK
service_up_re... | 0 | [
"CWE-295"
] | stunnel | ebad9ddc4efb2635f37174c9d800d06206f1edf9 | 175,258,017,104,657,300,000,000,000,000,000,000,000 | 23 | stunnel-5.57 |
struct vmcs *alloc_vmcs_cpu(bool shadow, int cpu, gfp_t flags)
{
int node = cpu_to_node(cpu);
struct page *pages;
struct vmcs *vmcs;
pages = __alloc_pages_node(node, flags, vmcs_config.order);
if (!pages)
return NULL;
vmcs = page_address(pages);
memset(vmcs, 0, vmcs_config.size);
/* KVM supports Enlightened... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 178,780,092,171,805,900,000,000,000,000,000,000,000 | 22 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
MagickExport MagickStatusType ParseRegionGeometry(const Image *image,
const char *geometry,RectangleInfo *region_info,ExceptionInfo *exception)
{
MagickStatusType
flags;
SetGeometry(image,region_info);
flags=ParseMetaGeometry(geometry,®ion_info->x,®ion_info->y,
®ion_info->width,®ion_info->h... | 0 | [
"CWE-369"
] | ImageMagick | f35eca82b0c294ff9d0ccad104a881c3ae2ba913 | 98,809,391,393,397,710,000,000,000,000,000,000,000 | 14 | https://github.com/ImageMagick/ImageMagick/issues/1725 |
static int mov_write_sidx_tag(AVIOContext *pb,
MOVTrack *track, int ref_size, int total_sidx_size)
{
int64_t pos = avio_tell(pb), offset_pos, end_pos;
int64_t presentation_time, duration, offset;
int starts_with_SAP, i, entries;
if (track->entry) {
entries = 1;
... | 0 | [
"CWE-369"
] | FFmpeg | 2c0e98a0b478284bdff6d7a4062522605a8beae5 | 142,618,611,952,515,140,000,000,000,000,000,000,000 | 60 | avformat/movenc: Write version 2 of audio atom if channels is not known
The version 1 needs the channel count and would divide by 0
Fixes: division by 0
Fixes: fpe_movenc.c_1108_1.ogg
Fixes: fpe_movenc.c_1108_2.ogg
Fixes: fpe_movenc.c_1108_3.wav
Found-by: #CHEN HONGXU# <HCHEN017@e.ntu.edu.sg>
Signed-off-by: Michael N... |
static void ip6_tnl_dev_setup(struct net_device *dev)
{
dev->netdev_ops = &ip6_tnl_netdev_ops;
dev->destructor = free_netdev;
dev->type = ARPHRD_TUNNEL6;
dev->hard_header_len = LL_MAX_HEADER + sizeof (struct ipv6hdr);
dev->mtu = ETH_DATA_LEN - sizeof (struct ipv6hdr);
dev->flags |= IFF_NOARP;
dev->addr_len = si... | 0 | [] | linux-2.6 | d5aa407f59f5b83d2c50ec88f5bf56d40f1f8978 | 279,061,666,175,104,600,000,000,000,000,000,000,000 | 12 | tunnels: fix netns vs proto registration ordering
Same stuff as in ip_gre patch: receive hook can be called before netns
setup is done, oopsing in net_generic().
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
do_query_writable_namespaces (GVfsBackend *backend,
GVfsJobQueryAttributes *query_job,
const char *filename)
{
GVfsBackendAdmin *self = G_VFS_BACKEND_ADMIN (backend);
GVfsJob *job = G_VFS_JOB (query_job);
GError *error = NULL;
GFile *file;
GFileAttri... | 0 | [] | gvfs | d7d362995aa0cb8905c8d5c2a2a4c305d2ffff80 | 180,793,177,830,217,960,000,000,000,000,000,000,000 | 25 | admin: Use fsuid to ensure correct file ownership
Files created over admin backend should be owned by root, but they are
owned by the user itself. This is because the daemon drops the uid to
make dbus connection work. Use fsuid and euid to fix this issue.
Closes: https://gitlab.gnome.org/GNOME/gvfs/issues/21 |
void ssl3_cbc_copy_mac(unsigned char *out,
const SSL3_RECORD *rec, unsigned md_size)
{
#if defined(CBC_MAC_ROTATE_IN_PLACE)
unsigned char rotated_mac_buf[64 + EVP_MAX_MD_SIZE];
unsigned char *rotated_mac;
#else
unsigned char rotated_mac[EVP_MAX_MD_SIZE];
#endif
/*
* mac_end ... | 0 | [
"CWE-20"
] | openssl | 4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2 | 323,142,758,032,896,040,000,000,000,000,000,000,000 | 71 | Don't change the state of the ETM flags until CCS processing
Changing the ciphersuite during a renegotiation can result in a crash
leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS
so this is TLS only.
The problem is caused by changing the flag indicating whether to use ETM
or not immediately on... |
BOOL io_start_buffering_in(int f_in)
{
if (msgs2stderr == 1 && DEBUG_GTE(IO, 2))
rprintf(FINFO, "[%s] io_start_buffering_in(%d)\n", who_am_i(), f_in);
if (iobuf.in.buf) {
if (iobuf.in_fd == -1)
iobuf.in_fd = f_in;
else
assert(f_in == iobuf.in_fd);
return False;
}
alloc_xbuf(&iobuf.in, ROUND_UP_1024(... | 0 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 216,756,000,596,574,700,000,000,000,000,000,000,000 | 18 | Some extra file-list safety checks. |
static void key_event(VncState *vs, int down, uint32_t sym)
{
int keycode;
int lsym = sym;
if (lsym >= 'A' && lsym <= 'Z' && qemu_console_is_graphic(NULL)) {
lsym = lsym - 'A' + 'a';
}
keycode = keysym2scancode(vs->vd->kbd_layout, lsym & 0xFFFF) & SCANCODE_KEYMASK;
trace_vnc_key_event_... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 156,648,098,767,162,400,000,000,000,000,000,000,000 | 13 | ui/vnc: fix potential memory corruption issues
this patch makes the VNC server work correctly if the
server surface and the guest surface have different sizes.
Basically the server surface is adjusted to not exceed VNC_MAX_WIDTH
x VNC_MAX_HEIGHT and additionally the width is rounded up to multiple of
VNC_DIRTY_PIXELS... |
static void strip_parentheses(struct st_command *command)
{
if (strip_surrounding(command->first_argument, '(', ')'))
die("%.*s - argument list started with '%c' must be ended with '%c'",
command->first_word_len, command->query, '(', ')');
} | 0 | [] | server | 01b39b7b0730102b88d8ea43ec719a75e9316a1e | 32,099,634,854,711,160,000,000,000,000,000,000,000 | 6 | mysqltest: don't eat new lines in --exec
pass them through as is |
unsigned long nsecs_to_usecs(unsigned long nsecs)
{
return nsecs / 1000;
} | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 117,039,628,831,984,860,000,000,000,000,000,000,000 | 4 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
template<typename t>
CImg(const unsigned int size_x, const unsigned int size_y, const unsigned int size_z, const unsigned int size_c,
const std::initializer_list<t> values,
const bool repeat_values=true):
_width(0),_height(0),_depth(0),_spectrum(0),_is_shared(false),_data(0) {
#define _cimg_con... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 20,987,094,859,065,400,000,000,000,000,000,000,000 | 13 | Fix other issues in 'CImg<T>::load_bmp()'. |
*/
static void php_wddx_pop_element(void *user_data, const XML_Char *name)
{
st_entry *ent1, *ent2;
wddx_stack *stack = (wddx_stack *)user_data;
HashTable *target_hash;
zend_class_entry *pce;
zval obj;
/* OBJECTS_FIXME */
if (stack->top == 0) {
return;
}
if (!strcmp((char *)name, EL_STRING) ||... | 0 | [
"CWE-476"
] | php-src | 8d2539fa0faf3f63e1d1e7635347c5b9e777d47b | 138,772,910,507,015,850,000,000,000,000,000,000,000 | 144 | Fix bug #73831 - NULL Pointer Dereference while unserialize php object |
ModuleLoader::Module* ModuleLoader::loadModule(const Firebird::PathName& modPath)
{
void* module = dlopen(modPath.nullStr(), FB_RTLD_MODE);
if (module == NULL)
{
#ifdef DEV_BUILD
// gds__log("loadModule failed loading %s: %s", modPath.c_str(), dlerror());
#endif
return 0;
}
#ifdef DEBUG_THREAD_IN_UNLOADED_LIBRA... | 1 | [
"CWE-89"
] | firebird | 56e9a73c16803c3544076edb2d6c4ca25815e541 | 63,758,589,742,817,560,000,000,000,000,000,000,000 | 20 | Backported fix for CORE-5474: 'Restrict UDF' is not effective, because fbudf.so is dynamically linked against libc |
apr_status_t h2_mplx_stream_cleanup(h2_mplx *m, h2_stream *stream)
{
H2_MPLX_ENTER(m);
ap_log_cerror(APLOG_MARK, APLOG_TRACE2, 0, m->c,
H2_STRM_MSG(stream, "cleanup"));
stream_cleanup(m, stream);
H2_MPLX_LEAVE(m);
return APR_SUCCESS;
} | 0 | [
"CWE-444"
] | mod_h2 | 825de6a46027b2f4c30d7ff5a0c8b852d639c207 | 161,761,324,698,902,800,000,000,000,000,000,000,000 | 11 | * Fixed keepalives counter on slave connections. |
static inline int tg_has_rt_tasks(struct task_group *tg)
{
struct task_struct *g, *p;
do_each_thread(g, p) {
if (rt_task(p) && rt_rq_of_se(&p->rt)->tg == tg)
return 1;
} while_each_thread(g, p);
return 0;
} | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 48,247,257,731,117,220,000,000,000,000,000,000,000 | 11 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
int getchannels(const char *optarg)
{
unsigned int i=0,chan_cur=0,chan_first=0,chan_last=0,chan_max=128,chan_remain=0;
char *optchan = NULL, *optc;
char *token = NULL;
int *tmp_channels;
//got a NULL pointer?
if(optarg == NULL)
return -1;
chan_remain=chan_max;
//create a writa... | 0 | [
"CWE-787"
] | aircrack-ng | ff70494dd389ba570dbdbf36f217c28d4381c6b5 | 72,285,129,069,257,710,000,000,000,000,000,000,000 | 118 | Airodump-ng: Fixed GPS stack overflow (Closes #13 on GitHub).
git-svn-id: http://svn.aircrack-ng.org/trunk@2416 28c6078b-6c39-48e3-add9-af49d547ecab |
static int session_handle_invalid_connection(nghttp2_session *session,
nghttp2_frame *frame,
int lib_error_code,
const char *reason) {
if (session->callbacks.on_invalid_frame_recv_cal... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 118,930,961,746,884,840,000,000,000,000,000,000,000 | 13 | Add nghttp2_option_set_max_outbound_ack |
static inline int ethertype_to_npindex(int ethertype)
{
switch (ethertype) {
case ETH_P_IP:
return NP_IP;
case ETH_P_IPV6:
return NP_IPV6;
case ETH_P_IPX:
return NP_IPX;
case ETH_P_PPPTALK:
case ETH_P_ATALK:
return NP_AT;
case ETH_P_MPLS_UC:
return NP_MPLS_UC;
case ETH_P_MPLS_MC:
return NP_MPLS_MC;
... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 159,173,452,393,263,240,000,000,000,000,000,000,000 | 19 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
PyBytes_ConcatAndDel(PyObject **pv, PyObject *w)
{
PyBytes_Concat(pv, w);
Py_XDECREF(w);
} | 0 | [
"CWE-190"
] | cpython | 6c004b40f9d51872d848981ef1a18bb08c2dfc42 | 36,304,645,629,641,140,000,000,000,000,000,000,000 | 5 | bpo-30657: Fix CVE-2017-1000158 (#4758)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
load_long(UnpicklerObject *self)
{
PyObject *value;
char *s = NULL;
Py_ssize_t len;
if ((len = _Unpickler_Readline(self, &s)) < 0)
return -1;
if (len < 2)
return bad_readline();
/* s[len-2] will usually be 'L' (and s[len-1] is '\n'); we need to remove
the 'L' before call... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 36,711,907,081,682,850,000,000,000,000,000,000,000 | 25 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
static PixelList *AcquirePixelList(const size_t width,const size_t height)
{
PixelList
*pixel_list;
pixel_list=(PixelList *) AcquireMagickMemory(sizeof(*pixel_list));
if (pixel_list == (PixelList *) NULL)
return(pixel_list);
(void) memset((void *) pixel_list,0,sizeof(*pixel_list));
pixel_list->length... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 025e77fcb2f45b21689931ba3bf74eac153afa48 | 55,455,992,397,931,120,000,000,000,000,000,000,000 | 19 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
GF_Err reftype_Read(GF_Box *s, GF_BitStream *bs)
{
u32 bytesToRead;
u32 i;
GF_TrackReferenceTypeBox *ptr = (GF_TrackReferenceTypeBox *)s;
bytesToRead = (u32) (ptr->size);
if (!bytesToRead) return GF_OK;
ptr->trackIDCount = (u32) (bytesToRead) / sizeof(u32);
ptr->trackIDs = (u32 *) gf_malloc(ptr->trackIDCount *... | 0 | [
"CWE-125"
] | gpac | bceb03fd2be95097a7b409ea59914f332fb6bc86 | 83,781,112,195,210,025,000,000,000,000,000,000,000 | 18 | fixed 2 possible heap overflows (inc. #1088) |
isdn_ppp_xmit(struct sk_buff *skb, struct net_device *netdev)
{
isdn_net_local *lp, *mlp;
isdn_net_dev *nd;
unsigned int proto = PPP_IP; /* 0x21 */
struct ippp_struct *ipt, *ipts;
int slot, retval = NETDEV_TX_OK;
mlp = netdev_priv(netdev);
nd = mlp->netdev; /* get master lp */
slot = mlp->ppp_slot;
... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 175,266,021,390,577,900,000,000,000,000,000,000,000 | 238 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
bool checkreturn pb_make_string_substream(pb_istream_t *stream, pb_istream_t *substream)
{
uint32_t size;
if (!pb_decode_varint32(stream, &size))
return false;
*substream = *stream;
if (substream->bytes_left < size)
PB_RETURN_ERROR(stream, "parent stream too short");
substr... | 0 | [
"CWE-763"
] | nanopb | e2f0ccf939d9f82931d085acb6df8e9a182a4261 | 159,104,770,774,333,950,000,000,000,000,000,000,000 | 14 | Fix invalid free() with oneof (#647)
Nanopb would call free() or realloc() on an invalid
(attacker controlled) pointer value when all the following
conditions are true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definition contains an oneof field, and the oneof
contains at least one pointer type fi... |
static void mctp_serial_tx_work(struct work_struct *work)
{
struct mctp_serial *dev = container_of(work, struct mctp_serial,
tx_work);
unsigned char c, buf[3];
unsigned long flags;
int len, txlen;
spin_lock_irqsave(&dev->lock, flags);
/* txstate represents the next thing to send */
switch (dev->txs... | 0 | [] | linux | 6c342ce2239c182c2428ce5a44cb32330434ae6e | 193,399,793,022,034,940,000,000,000,000,000,000,000 | 124 | mctp: serial: Cancel pending work from ndo_uninit handler
We cannot do the cancel_work_sync from after the unregister_netdev, as
the dev pointer is no longer valid, causing a uaf on ldisc unregister
(or device close).
Instead, do the cancel_work_sync from the ndo_uninit op, where the dev
still exists, but the queue h... |
md_ref_def_cmp_for_sort(const void* a, const void* b)
{
int cmp;
cmp = md_ref_def_cmp(a, b);
/* Ensure stability of the sorting. */
if(cmp == 0) {
const MD_REF_DEF* a_ref = *(const MD_REF_DEF**)a;
const MD_REF_DEF* b_ref = *(const MD_REF_DEF**)b;
if(a_ref < b_ref)
... | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 123,580,729,455,595,150,000,000,000,000,000,000,000 | 21 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
static json_t * generate_credential_fake_from_seed(const char * seed) {
unsigned char credential_id[64] = {0}, credential_id_b64[129], created_at[32], name_hash[32];
char * seed_credential_id, * seed_name, * seed_created_at, name[32];
time_t created_at_t;
size_t credential_id_len = 64, credential_id_b64_len, na... | 0 | [
"CWE-787"
] | glewlwyd | 4c5597c155bfbaf6491cf6b83479d241ae66940a | 111,243,307,455,939,370,000,000,000,000,000,000,000 | 66 | Fix possible buffer overflow |
kvm_calc_shadow_ept_root_page_role(struct kvm_vcpu *vcpu, bool accessed_dirty,
bool execonly, u8 level)
{
union kvm_mmu_role role = {0};
/* SMM flag is inherited from root_mmu */
role.base.smm = vcpu->arch.root_mmu.mmu_role.base.smm;
role.base.level = level;
role.base.has_4_byte_gpte = false;
role.base.d... | 0 | [
"CWE-476"
] | linux | 9f46c187e2e680ecd9de7983e4d081c3391acc76 | 253,045,152,421,265,900,000,000,000,000,000,000,000 | 22 | 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... |
void Compute(OpKernelContext* context) override {
const Tensor& tensor_in = context->input(0);
const Tensor& tensor_out = context->input(1);
const Tensor& out_grad_backprop = context->input(2);
// For maxpooling3d, tensor_in should have 5 dimensions.
OP_REQUIRES(context, tensor_in.dims() == 5,
... | 1 | [
"CWE-476"
] | tensorflow | a3d9f9be9ac2296615644061b40cefcee341dcc4 | 72,289,082,634,613,750,000,000,000,000,000,000,000 | 25 | Add missing validation to pooling_ops_3d
PiperOrigin-RevId: 372218727
Change-Id: I6b9ed4266aa7286c02f1f230d7bea922c1be547e |
static void multi_release_std_resource(struct mp_port *mtpt)
{
unsigned int size = 8 << mtpt->port.regshift;
switch (mtpt->port.iotype) {
case UPIO_MEM:
if (!mtpt->port.mapbase)
break;
if (mtpt->port.flags & UPF_IOREMAP) {
iounmap(mtpt->port.membase);
mtpt->port.membase = NULL;
}
release_... | 0 | [
"CWE-200"
] | linux | a8b33654b1e3b0c74d4a1fed041c9aae50b3c427 | 322,878,972,671,151,380,000,000,000,000,000,000,000 | 23 | Staging: sb105x: info leak in mp_get_count()
The icount.reserved[] array isn't initialized so it leaks stack
information to userspace.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Li... |
static int codeAllEqualityTerms(
Parse *pParse, /* Parsing context */
WhereLevel *pLevel, /* Which nested loop of the FROM we are coding */
int bRev, /* Reverse the order of IN operators */
int nExtraReg, /* Number of extra registers to allocate */
char **pzAff /* OUT: Set... | 0 | [
"CWE-476"
] | sqlite | 57f7ece78410a8aae86aa4625fb7556897db384c | 55,666,921,098,515,090,000,000,000,000,000,000,000 | 101 | Fix a problem that comes up when using generated columns that evaluate to a
constant in an index and then making use of that index in a join.
FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af |
struct page *alloc_pages_current(gfp_t gfp, unsigned order)
{
struct mempolicy *pol = current->mempolicy;
struct page *page;
if (!pol || in_interrupt() || (gfp & __GFP_THISNODE))
pol = &default_policy;
get_mems_allowed();
/*
* No reference counting needed for current->mempolicy
* nor system default_policy
... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 228,087,048,729,597,630,000,000,000,000,000,000,000 | 22 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
static void ion_buffer_kmap_put(struct ion_buffer *buffer)
{
buffer->kmap_cnt--;
if (!buffer->kmap_cnt) {
buffer->heap->ops->unmap_kernel(buffer->heap, buffer);
buffer->vaddr = NULL;
}
} | 0 | [
"CWE-416",
"CWE-284"
] | linux | 9590232bb4f4cc824f3425a6e1349afbe6d6d2b7 | 230,098,810,762,161,600,000,000,000,000,000,000,000 | 8 | staging/android/ion : fix a race condition in the ion driver
There is a use-after-free problem in the ion driver.
This is caused by a race condition in the ion_ioctl()
function.
A handle has ref count of 1 and two tasks on different
cpus calls ION_IOC_FREE simultaneously.
cpu 0 cpu ... |
on_bus_acquired (GDBusConnection *connection,
const gchar *name,
gpointer user_data)
{
A11yBusLauncher *app = user_data;
GError *error;
guint registration_id;
if (connection == NULL)
{
g_main_loop_quit (app->loop);
return;
}
app->session_bus... | 0 | [] | at-spi2-core | c2e87fe00b596dba20c9d57d406ab8faa744b15a | 254,301,323,442,964,170,000,000,000,000,000,000,000 | 47 | Fix inverted logic.
Don't write more into a buffer than it can hold.
https://bugzilla.gnome.org/show_bug.cgi?id=791124 |
int seccomp_memory_deny_write_execute(void) {
uint32_t arch;
int r;
SECCOMP_FOREACH_LOCAL_ARCH(arch) {
_cleanup_(seccomp_releasep) scmp_filter_ctx seccomp = NULL;
int filter_syscall = 0, block_syscall = 0, shmat_syscall = 0;
log_debug("Operating... | 1 | [] | systemd | 91691f1d3e3c66122fd0fc564ea3f20f566c2698 | 323,329,484,311,387,350,000,000,000,000,000,000,000 | 96 | shared/seccomp: skip pkey_mprotect protections if the syscall is unknown
When compiling with an old kernel on architectures for which the
number is not defined in missing.h, a warning is generated in missing.h.
Let's just skip the protection in this case, to allow build to proceed. |
static void open_func (LexState *ls, FuncState *fs, BlockCnt *bl) {
Proto *f = fs->f;
fs->prev = ls->fs; /* linked list of funcstates */
fs->ls = ls;
ls->fs = fs;
fs->pc = 0;
fs->previousline = f->linedefined;
fs->iwthabs = 0;
fs->lasttarget = 0;
fs->freereg = 0;
fs->nk = 0;
fs->nabslineinfo = 0;... | 0 | [
"CWE-125"
] | lua | 1f3c6f4534c6411313361697d98d1145a1f030fa | 62,800,105,503,826,970,000,000,000,000,000,000,000 | 25 | Bug: Lua can generate wrong code when _ENV is <const> |
void MainWindow::on_actionAppDataSet_triggered()
{
QMessageBox dialog(QMessageBox::Information,
qApp->applicationName(),
tr("You must restart Shotcut to change the data directory.\n"
"Do you want to continue?"),
QMessageB... | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 340,093,114,892,690,560,000,000,000,000,000,000,000 | 38 | fix upgrade check is not using TLS correctly |
*/
static int
xmlXPathCompareNodeSetString(xmlXPathParserContextPtr ctxt, int inf, int strict,
xmlXPathObjectPtr arg, xmlXPathObjectPtr s) {
int i, ret = 0;
xmlNodeSetPtr ns;
xmlChar *str2;
if ((s == NULL) || (arg == NULL) ||
((arg->type != XPATH_NODESET) && (arg->type != XPATH_X... | 0 | [
"CWE-119"
] | libxml2 | 91d19754d46acd4a639a8b9e31f50f31c78f8c9c | 272,549,365,019,792,100,000,000,000,000,000,000,000 | 31 | Fix the semantic of XPath axis for namespace/attribute context nodes
The processing of namespace and attributes nodes was not compliant
to the XPath-1.0 specification |
MagickPrivate MagickBooleanType SyncImageProfiles(Image *image)
{
#define MaxDirectoryStack 16
#define EXIF_DELIMITER "\n"
#define EXIF_NUM_FORMATS 12
#define TAG_EXIF_OFFSET 0x8769
#define TAG_INTEROP_OFFSET 0xa005
typedef struct _DirectoryInfo
{
unsigned char
*directory;
size_t
entry;
... | 0 | [
"CWE-190"
] | ImageMagick | e9438e2a82d35b6657e908ff38ec0303f432b655 | 29,876,945,351,101,470,000,000,000,000,000,000,000 | 214 | |
static void __net_random_once_deferred(struct work_struct *w)
{
struct __net_random_once_work *work =
container_of(w, struct __net_random_once_work, work);
BUG_ON(!static_key_enabled(work->key));
static_key_slow_dec(work->key);
kfree(work);
} | 0 | [
"CWE-200"
] | linux | 3d4405226d27b3a215e4d03cfa51f536244e5de7 | 262,926,707,504,006,250,000,000,000,000,000,000,000 | 8 | net: avoid dependency of net_get_random_once on nop patching
net_get_random_once depends on the static keys infrastructure to patch up
the branch to the slow path during boot. This was realized by abusing the
static keys api and defining a new initializer to not enable the call
site while still indicating that the bra... |
static int stub_send_ret_unlink(struct stub_device *sdev)
{
unsigned long flags;
struct stub_unlink *unlink, *tmp;
struct msghdr msg;
struct kvec iov[1];
size_t txsize;
size_t total_size = 0;
while ((unlink = dequeue_from_unlink_tx(sdev)) != NULL) {
int ret;
struct usbip_header pdu_header;
txsize = 0;
... | 0 | [
"CWE-476"
] | linux | be6123df1ea8f01ee2f896a16c2b7be3e4557a5a | 304,065,792,857,922,400,000,000,000,000,000,000,000 | 55 | usbip: fix stub_send_ret_submit() vulnerability to null transfer_buffer
stub_send_ret_submit() handles urb with a potential null transfer_buffer,
when it replays a packet with potential malicious data that could contain
a null buffer. Add a check for the condition when actual_length > 0 and
transfer_buffer is null.
R... |
static int ct_play_item(struct media_player *mp, const char *name,
uint64_t uid, void *user_data)
{
struct avrcp_player *player = user_data;
struct avrcp *session;
if (player->p != NULL)
return -EBUSY;
session = player->sessions->data;
set_ct_player(session, player);
if (g_strrstr(name, "/NowPlaying"))... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 130,678,510,677,290,770,000,000,000,000,000,000,000 | 23 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
static void InsertComplexDoubleRow(double *p,int y,Image *image,double MinVal,
double MaxVal)
{
ExceptionInfo
*exception;
double f;
int x;
register PixelPacket *q;
if (MinVal >= 0)
MinVal = -1;
if (MaxVal <= 0)
MaxVal = 1;
exception=(&image->exception);
q=QueueAuthenticPixels(image,0,y,... | 0 | [
"CWE-416"
] | ImageMagick6 | 5caef6e97f3f575cf7bea497865a4c1e624b8010 | 68,432,100,985,343,870,000,000,000,000,000,000,000 | 66 | https://github.com/ImageMagick/ImageMagick/issues/1554 |
static rsRetVal qDelFixedArray(qqueue_t *pThis)
{
DEFiRet;
ASSERT(pThis != NULL);
pThis->tVars.farray.head++;
if (pThis->tVars.farray.head == pThis->iMaxQueueSize)
pThis->tVars.farray.head = 0;
RETiRet;
} | 0 | [
"CWE-772"
] | rsyslog | dfa88369d4ca4290db56b843f9eabdae1bfe0fd5 | 303,124,013,520,038,570,000,000,000,000,000,000,000 | 12 | bugfix: memory leak when $RepeatedMsgReduction on was used
bug tracker: http://bugzilla.adiscon.com/show_bug.cgi?id=225 |
static int ZEND_FASTCALL ZEND_DIV_SPEC_TMP_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1, free_op2;
div_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_tmp(&opline->op2, EX(Ts), &free_op2 TSR... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 109,091,206,996,181,630,000,000,000,000,000,000,000 | 12 | - 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 |
static inline void atalk_insert_socket(struct sock *sk)
{
write_lock_bh(&atalk_sockets_lock);
__atalk_insert_socket(sk);
write_unlock_bh(&atalk_sockets_lock);
} | 0 | [] | history | 7ab442d7e0a76402c12553ee256f756097cae2d2 | 130,151,652,560,112,290,000,000,000,000,000,000,000 | 6 | [DDP]: Convert to new protocol interface.
Convert ddp to the new protocol interface which means it has to
handle fragmented skb's. The only big change is in the checksum
routine which has to do more work (like skb_checksum).
Minor speedup is folding the carry to avoid a branch.
Tested against a 2.4 system and by ru... |
static int find_large_solid_color_rect(VncState *vs, int x, int y,
int w, int h, int max_rows)
{
int dx, dy, dw, dh;
int n = 0;
/* Try to find large solid-color areas and send them separately. */
for (dy = y; dy < y + h; dy += VNC_TIGHT_MAX_SPLIT_TILE_SIZE) {
... | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 200,633,415,199,042,950,000,000,000,000,000,000,000 | 81 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
Status TF_TensorToMaybeAliasedPyArray(Safe_TF_TensorPtr tensor,
PyObject** out_ndarray) {
auto dtype = TF_TensorType(tensor.get());
if (dtype == TF_STRING || dtype == TF_RESOURCE) {
return TF_TensorToPyArray(std::move(tensor), out_ndarray);
}
TF_Tensor* moved = tensor.... | 0 | [
"CWE-476",
"CWE-843"
] | tensorflow | 030af767d357d1b4088c4a25c72cb3906abac489 | 210,135,801,725,619,260,000,000,000,000,000,000,000 | 16 | Fix `tf.raw_ops.ResourceCountUpTo` null pointer dereference.
PiperOrigin-RevId: 368294347
Change-Id: I2c16fbfc9b4966c402c3d8e311f0d665a9c852d8 |
static NTSTATUS dns_add_socket(struct dns_server *dns,
const struct model_ops *model_ops,
const char *name,
const char *address,
uint16_t port)
{
struct dns_socket *dns_socket;
struct dns_udp_socket *dns_udp_socket;
struct tevent_req *udpsubreq;
NTSTATUS status;
int ret;
d... | 0 | [
"CWE-20"
] | samba | 392ec4d241eb19c812cd49ff73bd32b2b09d8533 | 227,087,911,525,522,480,000,000,000,000,000,000,000 | 68 | bug #10609: CVE-2014-0239 Don't reply to replies
Due to insufficient input checking, the DNS server will reply to a packet that
has the "reply" bit set. Over UDP, this allows to send a packet with a spoofed
sender address and have two servers DOS each other with circular replies.
This patch fixes bug #10609 and adds ... |
i915_gem_userptr_release__mmu_notifier(struct drm_i915_gem_object *obj)
{
struct i915_mmu_object *mo;
mo = fetch_and_zero(&obj->userptr.mmu_object);
if (!mo)
return;
spin_lock(&mo->mn->lock);
del_object(mo);
spin_unlock(&mo->mn->lock);
kfree(mo);
} | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 3,072,719,657,554,905,400,000,000,000,000,000,000 | 13 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
static char *ns_dname(struct dentry *dentry, char *buffer, int buflen)
{
struct inode *inode = d_inode(dentry);
const struct proc_ns_operations *ns_ops = dentry->d_fsdata;
return dynamic_dname(dentry, buffer, buflen, "%s:[%lu]",
ns_ops->name, inode->i_ino);
} | 0 | [
"CWE-416",
"CWE-362"
] | linux | 073c516ff73557a8f7315066856c04b50383ac34 | 109,836,143,428,017,400,000,000,000,000,000,000,000 | 8 | nsfs: mark dentry with DCACHE_RCUACCESS
Andrey reported a use-after-free in __ns_get_path():
spin_lock include/linux/spinlock.h:299 [inline]
lockref_get_not_dead+0x19/0x80 lib/lockref.c:179
__ns_get_path+0x197/0x860 fs/nsfs.c:66
open_related_ns+0xda/0x200 fs/nsfs.c:143
sock_ioctl+0x39d/0x440 net/socket.c:10... |
ext4_ext_in_cache(struct inode *inode, ext4_lblk_t block,
struct ext4_extent *ex)
{
struct ext4_ext_cache *cex;
int ret = EXT4_EXT_CACHE_NO;
/*
* We borrow i_block_reservation_lock to protect i_cached_extent
*/
spin_lock(&EXT4_I(inode)->i_block_reservation_lock);
cex = &EXT4_I(inode)->i_cached_extent;
/... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 112,968,105,383,150,620,000,000,000,000,000,000,000 | 31 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
static inline void reset_deferred_meminit(pg_data_t *pgdat)
{
} | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 213,976,874,598,944,100,000,000,000,000,000,000,000 | 3 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
gint rtps_util_add_seq_octets(proto_tree *tree, packet_info *pinfo, tvbuff_t *tvb,
gint offset, const guint encoding, int param_length, int hf_id) {
guint32 seq_length;
proto_item *ti;
ti = proto_tree_add_item_ret_uint(tree, hf_rtps_sequence_size, tvb, offset, 4, encoding, &seq_leng... | 0 | [
"CWE-401"
] | wireshark | 33e63d19e5496c151bad69f65cdbc7cba2b4c211 | 43,594,271,155,703,020,000,000,000,000,000,000,000 | 20 | RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.
Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating ... |
void js_toprimitive(js_State *J, int idx, int hint)
{
jsV_toprimitive(J, stackidx(J, idx), hint);
} | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 21,365,583,256,986,600,000,000,000,000,000,000,000 | 4 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
static void snd_pcm_xrun_injection_write(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
struct snd_pcm_substream *substream = entry->private_data;
struct snd_pcm_runtime *runtime;
snd_pcm_stream_lock_irq(substream);
runtime = substream->runtime;
if (runtime && runtime->status->state == SNDR... | 0 | [
"CWE-416"
] | linux | 362bca57f5d78220f8b5907b875961af9436e229 | 24,357,554,291,858,895,000,000,000,000,000,000,000 | 12 | ALSA: pcm: prevent UAF in snd_pcm_info
When the device descriptor is closed, the `substream->runtime` pointer
is freed. But another thread may be in the ioctl handler, case
SNDRV_CTL_IOCTL_PCM_INFO. This case calls snd_pcm_info_user() which
calls snd_pcm_info() which accesses the now freed `substream->runtime`.
Note:... |
static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
AVStream *st;
MOVStreamContext *sc;
unsigned int i, entries;
if (c->fc->nb_streams < 1)
return 0;
st = c->fc->streams[c->fc->nb_streams-1];
sc = st->priv_data;
avio_r8(pb); /* version */
avio_rb24(pb); /* ... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 689e59b7ffed34eba6159dcc78e87133862e3746 | 254,330,397,602,200,980,000,000,000,000,000,000,000 | 48 | mov: reset dref_count on realloc to keep values consistent.
This fixes a potential crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static void cjson_create_array_reference_should_create_an_array_reference(void) {
cJSON *number_reference = NULL;
cJSON *number_array = cJSON_CreateArray();
cJSON *number = cJSON_CreateNumber(42);
TEST_ASSERT_TRUE(cJSON_IsNumber(number));
TEST_ASSERT_TRUE(cJSON_IsArray(number_array));
cJSON_Add... | 0 | [
"CWE-754",
"CWE-787"
] | cJSON | be749d7efa7c9021da746e685bd6dec79f9dd99b | 274,618,162,873,900,900,000,000,000,000,000,000,000 | 16 | Fix crash of cJSON_GetObjectItemCaseSensitive when calling it on arrays |
void CServer::SendConnectionReady(int ClientID)
{
CMsgPacker Msg(NETMSG_CON_READY);
SendMsgEx(&Msg, MSGFLAG_VITAL|MSGFLAG_FLUSH, ClientID, true);
} | 0 | [
"CWE-20"
] | teeworlds | a766cb44bcffcdb0b88e776d01c5ee1323d44f85 | 12,865,524,595,830,880,000,000,000,000,000,000,000 | 5 | fixed a server crash |
static void sas_init_port(struct asd_sas_port *port,
struct sas_ha_struct *sas_ha, int i)
{
memset(port, 0, sizeof(*port));
port->id = i;
INIT_LIST_HEAD(&port->dev_list);
INIT_LIST_HEAD(&port->disco_list);
INIT_LIST_HEAD(&port->destroy_list);
spin_lock_init(&port->phy_list_lock);
INIT_LIST_HEAD(&port->phy_l... | 1 | [
"CWE-284"
] | linux | 0558f33c06bb910e2879e355192227a8e8f0219d | 233,077,552,265,743,600,000,000,000,000,000,000,000 | 14 | scsi: libsas: direct call probe and destruct
In commit 87c8331fcf72 ("[SCSI] libsas: prevent domain rediscovery
competing with ata error handling") introduced disco mutex to prevent
rediscovery competing with ata error handling and put the whole
revalidation in the mutex. But the rphy add/remove needs to wait for the
... |
static int oz_get_port_from_addr(struct oz_hcd *ozhcd, u8 bus_addr)
{
int i;
for (i = 0; i < OZ_NB_PORTS; i++) {
if (ozhcd->ports[i].bus_addr == bus_addr)
return i;
}
return ozhcd->conn_port;
} | 0 | [
"CWE-703",
"CWE-189"
] | linux | b1bb5b49373b61bf9d2c73a4d30058ba6f069e4c | 191,666,106,729,852,160,000,000,000,000,000,000,000 | 10 | ozwpan: Use unsigned ints to prevent heap overflow
Using signed integers, the subtraction between required_size and offset
could wind up being negative, resulting in a memcpy into a heap buffer
with a negative length, resulting in huge amounts of network-supplied
data being copied into the heap, which could potentiall... |
ex_call(exarg_T *eap)
{
char_u *arg = eap->arg;
char_u *startarg;
char_u *name;
char_u *tofree;
int len;
typval_T rettv;
linenr_T lnum;
int doesrange;
int failed = FALSE;
funcdict_T fudi;
partial_T *partial = NULL;
evalarg_T evalarg;
type_T *type = NULL;
int f... | 0 | [
"CWE-416"
] | vim | 9c23f9bb5fe435b28245ba8ac65aa0ca6b902c04 | 266,032,692,246,690,520,000,000,000,000,000,000,000 | 164 | patch 8.2.3902: Vim9: double free with nested :def function
Problem: Vim9: double free with nested :def function.
Solution: Pass "line_to_free" from compile_def_function() and make sure
cmdlinep is valid. |
void FilterManager::addAccessLogHandler(AccessLog::InstanceSharedPtr handler) {
access_log_handlers_.push_back(handler);
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 310,820,353,259,029,230,000,000,000,000,000,000,000 | 3 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
inline ha_rows num_deleted() const { return deleted; } | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 98,859,541,787,519,140,000,000,000,000,000,000,000 | 1 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
Parses an address string */
PHP_FUNCTION(imap_rfc822_parse_adrlist)
{
zval tovals;
zend_string *str, *defaulthost;
char *str_copy;
ADDRESS *addresstmp;
ENVELOPE *env;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "SS", &str, &defaulthost) == FAILURE) {
return;
}
env = mail_newenvelope();
/* rfc822_parse_a... | 0 | [
"CWE-88"
] | php-src | 336d2086a9189006909ae06c7e95902d7d5ff77e | 250,204,985,773,922,260,000,000,000,000,000,000,000 | 42 | Disable rsh/ssh functionality in imap by default (bug #77153) |
int rad_packet_recv(int fd, struct rad_packet_t **p, struct sockaddr_in *addr)
{
struct rad_packet_t *pack;
struct rad_attr_t *attr;
struct rad_dict_attr_t *da;
struct rad_dict_vendor_t *vendor;
uint8_t *ptr;
int n, id, len, vendor_id;
socklen_t addr_len = sizeof(*addr);
*p = NULL;
pack = rad_packet_alloc(0)... | 0 | [
"CWE-787"
] | accel-ppp | d4cb89721cc8e5b3dd3fbefaf173eb77ecb85615 | 322,569,583,231,270,970,000,000,000,000,000,000,000 | 182 | fix buffer overflow when receive radius packet
This patch fixes buffer overflow if radius packet contains invalid atribute length
and attrubute type from the following list: ipv4addr, ipv6addr, ipv6prefix or ifid
Reported-by: Chloe Ong
Reported-by: Eugene Lim <spaceraccoon@users.noreply.github.com>
Reported-by: Kar We... |
bool PostgreSqlStorage::updateNetwork(UserId user, const NetworkInfo &info)
{
QSqlDatabase db = logDb();
if (!db.transaction()) {
qWarning() << "PostgreSqlStorage::updateNetwork(): failed to begin transaction!";
qWarning() << " -" << qPrintable(db.lastError().text());
return false;
}... | 0 | [
"CWE-89"
] | quassel | aa1008be162cb27da938cce93ba533f54d228869 | 30,977,266,446,853,230,000,000,000,000,000,000,000 | 53 | Fixing security vulnerability with Qt 4.8.5+ and PostgreSQL.
Properly detects whether Qt performs slash escaping in SQL queries or
not, and then configures PostgreSQL accordingly. This bug was a
introduced due to a bugfix in Qt 4.8.5 disables slash escaping when
binding queries: https://bugreports.qt-project.org/brows... |
Perl_pregexec(pTHX_ REGEXP * const prog, char* stringarg, char *strend,
char *strbeg, SSize_t minend, SV *screamer, U32 nosave)
/* stringarg: the point in the string at which to begin matching */
/* strend: pointer to null at end of string */
/* strbeg: real beginning of string */
/* minend: end of match mus... | 0 | [
"CWE-416"
] | perl5 | 22b433eff9a1ffa2454e18405a56650f07b385b5 | 12,234,925,906,874,550,000,000,000,000,000,000,000 | 16 | PATCH [perl #123562] Regexp-matching "hangs"
The regex engine got into an infinite loop because of the malformation.
It is trying to back-up over a sequence of UTF-8 continuation bytes.
But the character just before the sequence should be a start byte. If
not, there is a malformation. I added a test to croak if that... |
static int ath6kl_wmi_scan_complete_rx(struct wmi *wmi, u8 *datap, int len,
struct ath6kl_vif *vif)
{
struct wmi_scan_complete_event *ev;
ev = (struct wmi_scan_complete_event *) datap;
ath6kl_scan_complete_evt(vif, a_sle32_to_cpu(ev->status));
wmi->is_probe_ssid = false;
return 0;
} | 0 | [
"CWE-125"
] | linux | 5d6751eaff672ea77642e74e92e6c0ac7f9709ab | 255,879,530,543,007,080,000,000,000,000,000,000,000 | 12 | ath6kl: add some bounds checking
The "ev->traffic_class" and "reply->ac" variables come from the network
and they're used as an offset into the wmi->stream_exist_for_ac[] array.
Those variables are u8 so they can be 0-255 but the stream_exist_for_ac[]
array only has WMM_NUM_AC (4) elements. We need to add a couple bo... |
static int ZEND_FASTCALL ZEND_CAST_SPEC_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *expr = _get_zval_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
zval *result = &EX_T(opline->result.u.var).tmp_var;
if (opline->extended_value != IS_STRING) {
*result ... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 222,639,664,027,163,870,000,000,000,000,000,000,000 | 54 | - 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.