func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static unsigned deflateDynamic(ucvector* out, size_t* bp, Hash* hash,
const unsigned char* data, size_t datapos, size_t dataend,
const LodePNGCompressSettings* settings, unsigned final)
{
unsigned error = 0;
/*
A block is compressed as follows: The PN... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 271,746,118,842,044,000,000,000,000,000,000,000,000 | 257 | Fixed #5645: realloc return handling |
void __fastcall TOwnConsole::WindowStateTimer(TObject * /*Sender*/)
{
DebugAssert(FConsoleWindow != NULL);
WINDOWPLACEMENT Placement;
memset(&Placement, 0, sizeof(Placement));
Placement.length = sizeof(Placement);
if (GetWindowPlacement(FConsoleWindow, &Placement))
{
bool Minimized = (Placement.... | 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 123,786,712,932,088,980,000,000,000,000,000,000,000 | 30 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
logfmtpacket(dns_message_t *message, const char *description,
isc_sockaddr_t *address, isc_logcategory_t *category,
isc_logmodule_t *module, const dns_master_style_t *style,
int level, isc_mem_t *mctx)
{
char addrbuf[ISC_SOCKADDR_FORMATSIZE] = { 0 };
const char *newline = "\n";
const char *space = ... | 0 | [
"CWE-617"
] | bind9 | 6ed167ad0a647dff20c8cb08c944a7967df2d415 | 118,245,625,434,159,480,000,000,000,000,000,000,000 | 46 | Always keep a copy of the message
this allows it to be available even when dns_message_parse()
returns a error. |
static void sig_complete_format(GList **list, WINDOW_REC *window,
const char *word, const char *line, int *want_space)
{
const char *ptr;
int words;
g_return_if_fail(list != NULL);
g_return_if_fail(word != NULL);
g_return_if_fail(line != NULL);
ptr = line;
words = 0;
do {
ptr++;
... | 0 | [
"CWE-125"
] | irssi | e0c66e31224894674356ddaf6d46016c1abc994f | 143,727,948,528,568,100,000,000,000,000,000,000,000 | 26 | Previous theme patch fixes by c0ffee
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3058 dbcabf3a-b0e7-0310-adc4-f8d773084564 |
static bool notify_change_record_identical(struct notify_change_event *c1,
struct notify_change_event *c2)
{
/* Note this is deliberately case sensitive. */
if (c1->action == c2->action &&
strcmp(c1->name, c2->name) == 0) {
return True;
}
return False;
} | 0 | [
"CWE-266"
] | samba | 5dd4c789c13035b805fdd2c3a9c38721657b05b3 | 206,530,335,082,749,750,000,000,000,000,000,000,000 | 10 | s3: smbd: Ensure change notifies can't get set unless the directory handle is open for SEC_DIR_LIST.
Remove knownfail entry.
CVE-2020-14318
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14434
Signed-off-by: Jeremy Allison <jra@samba.org> |
static int icmp6_cksum(netdissect_options *ndo, const struct ip6_hdr *ip6,
const struct icmp6_hdr *icp, u_int len)
{
return nextproto6_cksum(ndo, ip6, (const uint8_t *)(const void *)icp, len, len,
IPPROTO_ICMPV6);
} | 0 | [
"CWE-125"
] | tcpdump | d7505276842e85bfd067fa21cdb32b8a2dc3c5e4 | 40,437,821,301,700,275,000,000,000,000,000,000,000 | 6 | (for 4.9.3) CVE-2018-14882/ICMP6 RPL: Add a missing bounds check
Moreover:
Add and use *_tstr[] strings.
Update four tests outputs accordingly.
Fix a space.
Wang Junjie of 360 ESG Codesafe Team had independently identified this
vulnerability in 2018 by means of fuzzing and provided the packet capture
file for the tes... |
int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic)
{
av_assert0(0);
return AVERROR_BUG;
} | 0 | [
"CWE-703"
] | FFmpeg | e5c7229999182ad1cef13b9eca050dba7a5a08da | 53,392,670,578,848,420,000,000,000,000,000,000,000 | 5 | avcodec/utils: set AVFrame format unconditional
Fixes inconsistency and out of array accesses
Fixes: 10cdd7e63e7f66e3e66273939e0863dd-asan_heap-oob_1a4ff32_7078_cov_4056274555_mov_h264_aac__mp4box_frag.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
Interval IndexBoundsBuilder::makePointInterval(double d) {
BSONObjBuilder bob;
bob.append("", d);
return makePointInterval(bob.obj());
} | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 117,514,455,699,840,450,000,000,000,000,000,000,000 | 5 | SERVER-44377 generate correct plan for indexed inequalities to null |
int ssl_undefined_function(SSL *s)
{
SSLerr(SSL_F_SSL_UNDEFINED_FUNCTION, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return (0);
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 114,276,298,677,098,210,000,000,000,000,000,000,000 | 5 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
void compute_statistics()
{
if (!empty())
{
statistic_increment(*ptr_binlog_cache_use, &LOCK_status);
if (cache_log.disk_writes != 0)
statistic_increment(*ptr_binlog_cache_disk_use, &LOCK_status);
}
} | 0 | [
"CWE-264"
] | mysql-server | 48bd8b16fe382be302c6f0b45931be5aa6f29a0e | 64,802,819,002,136,620,000,000,000,000,000,000,000 | 9 | Bug#24388753: PRIVILEGE ESCALATION USING MYSQLD_SAFE
[This is the 5.5/5.6 version of the bugfix].
The problem was that it was possible to write log files ending
in .ini/.cnf that later could be parsed as an options file.
This made it possible for users to specify startup options
without the permissions to do so.
Thi... |
static int doBundleRestartInstance(struct nc_state_t *nc, ncMetadata * pMeta, char *instanceId)
{
ncInstance *instance = NULL;
// sanity checking
if (instanceId == NULL) {
LOGERROR("bundle restart instance called with invalid parameters\n");
return (EUCA_ERROR);
}
// find the instan... | 0 | [] | eucalyptus | c252889a46f41b4c396b89e005ec89836f2524be | 260,633,841,705,609,830,000,000,000,000,000,000,000 | 17 | Input validation, shellout hardening on back-end
- validating bucketName and bucketPath in BundleInstance
- validating device name in Attach and DetachVolume
- removed some uses of system() and popen()
Fixes EUCA-7572, EUCA-7520 |
static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fname_len, int use_arg) /* {{{ */
{
spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(getThis() TSRMLS_CC);
HashTable *aht = spl_array_get_hash_table(intern, 0 TSRMLS_CC);
zval *tmp, *arg = NULL;
zval *retval_ptr = ... | 1 | [] | php-src | b7fa67742cd8d2b0ca0c0273b157f6ffee9ad6e2 | 104,983,625,279,814,640,000,000,000,000,000,000,000 | 42 | Fix bug #70068 (Dangling pointer in the unserialization of ArrayObject items) |
*/
PHP_MINIT_FUNCTION(wddx)
{
le_wddx = zend_register_list_destructors_ex(release_wddx_packet_rsrc, NULL, "wddx", module_number);
#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
php_session_register_serializer("wddx",
PS_SERIALIZER_ENCODE_NAME(wddx),
PS_SERIALIZER_DECODE_NAME(wddx));
#endif
... | 0 | [] | php-src | 366f9505a4aae98ef2f4ca39a838f628a324b746 | 140,467,104,189,702,540,000,000,000,000,000,000,000 | 12 | Fixed bug #70661 (Use After Free Vulnerability in WDDX Packet Deserialization)
Conflicts:
ext/wddx/wddx.c |
const QMap<QString, QString> Database::getFriends() {
QMap<QString, QString> qm;
QSqlQuery query;
query.prepare(QLatin1String("SELECT `name`, `hash` FROM `friends`"));
query.exec();
while (query.next())
qm.insert(query.value(0).toString(), query.value(1).toString());
return qm;
} | 0 | [
"CWE-310"
] | mumble | 5632c35d6759f5e13a7dfe78e4ee6403ff6a8e3e | 154,592,070,172,725,820,000,000,000,000,000,000,000 | 10 | Explicitly remove file permissions for settings and DB |
static int ntop_stats_get_samplings_of_days_from_epoch(lua_State *vm) {
time_t epoch_start, epoch_end;
int num_days;
int ifid;
NetworkInterface* iface;
StatsManager *sm;
struct statsManagerRetrieval retvals;
ntop->getTrace()->traceEvent(TRACE_DEBUG, "%s() called", __FUNCTION__);
if(ntop_lua_check(vm, ... | 0 | [
"CWE-476"
] | ntopng | 01f47e04fd7c8d54399c9e465f823f0017069f8f | 160,448,177,394,341,390,000,000,000,000,000,000,000 | 41 | Security fix: prevents empty host from being used |
static int SetEd25519PublicKey(byte* output, ed25519_key* key, int with_header)
{
byte bitString[1 + MAX_LENGTH_SZ + 1];
int algoSz;
int bitStringSz;
int idx;
word32 pubSz = ED25519_PUB_KEY_SIZE;
#ifdef WOLFSSL_SMALL_STACK
byte* algo = NULL;
byte* pub;
#else
byte algo[MAX_ALGO_SZ];
... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 253,112,363,367,826,580,000,000,000,000,000,000,000 | 66 | OCSP: improve handling of OCSP no check extension |
can_compound(slang_T *slang, char_u *word, char_u *flags)
{
char_u uflags[MAXWLEN * 2];
int i;
char_u *p;
if (slang->sl_compprog == NULL)
return FALSE;
if (enc_utf8)
{
// Need to convert the single byte flags to utf8 characters.
p = uflags;
for (i = 0; flags[i] != NUL; ++i)
p += utf_c... | 0 | [
"CWE-416"
] | vim | 2813f38e021c6e6581c0c88fcf107e41788bc835 | 106,614,026,587,503,460,000,000,000,000,000,000,000 | 30 | patch 8.2.5072: using uninitialized value and freed memory in spell command
Problem: Using uninitialized value and freed memory in spell command.
Solution: Initialize "attr". Check for empty line early. |
bool Item_param::set_longdata(const char *str, ulong length)
{
DBUG_ENTER("Item_param::set_longdata");
DBUG_ASSERT(value.type_handler()->cmp_type() == STRING_RESULT);
/*
If client character set is multibyte, end of long data packet
may hit at the middle of a multibyte character. Additionally,
if bin... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 272,944,198,999,731,370,000,000,000,000,000,000,000 | 33 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
static int nfs4_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fsinfo *fsinfo)
{
int error;
nfs_fattr_init(fsinfo->fattr);
error = nfs4_do_fsinfo(server, fhandle, fsinfo);
if (error == 0) {
/* block layout checks this! */
server->pnfs_blksize = fsinfo->blksize;
set_pnfs_layoutdrive... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 62,123,179,804,544,650,000,000,000,000,000,000,000 | 14 | 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... |
Q_GUI_EXPORT QPainterPath qt_painterPathFromVectorPath(const QVectorPath &path)
{
const qreal *points = path.points();
const QPainterPath::ElementType *types = path.elements();
QPainterPath p;
if (types) {
int id = 0;
for (int i=0; i<path.elementCount(); ++i) {
switch(types[... | 0 | [
"CWE-787"
] | qtbase | 6b400e3147dcfd8cc3a393ace1bd118c93762e0c | 278,032,113,856,391,740,000,000,000,000,000,000,000 | 44 | Improve fix for avoiding huge number of tiny dashes
Some pathological cases were not caught by the previous fix.
Fixes: QTBUG-95239
Pick-to: 6.2 6.1 5.15
Change-Id: I0337ee3923ff93ccb36c4d7b810a9c0667354cc5
Reviewed-by: Robert Löhning <robert.loehning@qt.io> |
rsvg_filter_free_pair (gpointer value)
{
RsvgFilterPrimitiveOutput *output;
output = (RsvgFilterPrimitiveOutput *) value;
g_object_unref (output->result);
g_free (output);
} | 0 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 202,026,477,244,032,750,000,000,000,000,000,000,000 | 8 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
static WORD_LIST *
expand_string_leave_quoted (string, quoted)
char *string;
int quoted;
{
WORD_LIST *tlist;
WORD_LIST *tresult;
if (string == 0 || *string == '\0')
return ((WORD_LIST *)NULL);
tlist = expand_string_internal (string, quoted);
if (tlist)
{
tresult = word_list_split (t... | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 288,470,802,401,405,260,000,000,000,000,000,000,000 | 20 | Bash-4.4 patch 7 |
int qeth_mdio_read(struct net_device *dev, int phy_id, int regnum)
{
struct qeth_card *card = dev->ml_priv;
int rc = 0;
switch (regnum) {
case MII_BMCR: /* Basic mode control register */
rc = BMCR_FULLDPLX;
if ((card->info.link_type != QETH_LINK_TYPE_GBIT_ETH) &&
(card->info.link_type != QETH_LINK_TYPE_O... | 0 | [
"CWE-200",
"CWE-119"
] | linux | 6fb392b1a63ae36c31f62bc3fc8630b49d602b62 | 286,624,242,111,441,550,000,000,000,000,000,000,000 | 63 | 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... |
set_photo (EBookBackendEws *bbews,
const EwsId *item_id,
EContact *contact,
EContactPhoto *photo,
gchar **new_change_key,
GCancellable *cancellable,
GError **error)
{
EEwsAttachmentInfo *info;
EwsId *id = NULL;
GSList *files = NULL;
const guchar *data;
gsize len;
if (!item_id) {
id = g_... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 162,064,865,900,527,050,000,000,000,000,000,000,000 | 52 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
krb5_init_creds_free(krb5_context context,
krb5_init_creds_context ctx)
{
free_init_creds_ctx(context, ctx);
free(ctx);
} | 0 | [
"CWE-320"
] | heimdal | 2f7f3d9960aa6ea21358bdf3687cee5149aa35cf | 276,093,763,677,103,500,000,000,000,000,000,000,000 | 6 | CVE-2019-12098: krb5: always confirm PA-PKINIT-KX for anon PKINIT
RFC8062 Section 7 requires verification of the PA-PKINIT-KX key excahnge
when anonymous PKINIT is used. Failure to do so can permit an active
attacker to become a man-in-the-middle.
Introduced by a1ef548600c5bb51cf52a9a9ea12676506ede19f. First tagged... |
int kvm_inject_realmode_interrupt(struct kvm_vcpu *vcpu, int irq, int inc_eip)
{
struct x86_emulate_ctxt *ctxt = &vcpu->arch.emulate_ctxt;
int ret;
init_emulate_ctxt(vcpu);
ctxt->op_bytes = 2;
ctxt->ad_bytes = 2;
ctxt->_eip = ctxt->eip + inc_eip;
ret = emulate_int_real(ctxt, irq);
if (ret != X86EMUL_CONTINUE... | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 301,065,027,666,092,700,000,000,000,000,000,000,000 | 27 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
TEST_F(DocumentSourceMatchTest, ClauseAndedWithCommentShouldAddDependencies) {
auto match =
DocumentSourceMatch::create(fromjson("{a: 4, $comment: 'irrelevant'}"), getExpCtx());
DepsTracker dependencies;
ASSERT_EQUALS(DepsTracker::State::SEE_NEXT, match->getDependencies(&dependencies));
ASSERT_E... | 0 | [] | mongo | b3107d73a2c58d7e016b834dae0acfd01c0db8d7 | 28,516,668,656,906,320,000,000,000,000,000,000,000 | 10 | SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt
(cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec) |
TfLiteStatus SoftmaxPrepare(TfLiteContext* context, TfLiteNode* node) {
auto* params = reinterpret_cast<TfLiteSoftmaxParams*>(node->builtin_data);
SoftmaxOpData* data = reinterpret_cast<SoftmaxOpData*>(node->user_data);
TF_LITE_ENSURE_EQ(context, NumInputs(node), 1);
TF_LITE_ENSURE_EQ(context, NumOutputs(node)... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 301,772,399,545,705,900,000,000,000,000,000,000,000 | 70 | [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... |
cJSON *cJSON_CreateTrue( void )
{
cJSON *item = cJSON_New_Item();
if ( item )
item->type = cJSON_True;
return item;
} | 1 | [
"CWE-120",
"CWE-119",
"CWE-787"
] | iperf | 91f2fa59e8ed80dfbf400add0164ee0e508e412a | 146,480,624,830,980,330,000,000,000,000,000,000,000 | 7 | 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... |
m4___line__ (struct obstack *obs, int argc, token_data **argv)
{
if (bad_argc (argv[0], argc, 1, 1))
return;
shipout_int (obs, current_line);
} | 0 | [] | m4 | 5345bb49077bfda9fabd048e563f9e7077fe335d | 61,445,806,470,414,070,000,000,000,000,000,000,000 | 6 | Minor security fix: Quote output of mkstemp.
* src/builtin.c (mkstemp_helper): Produce quoted output.
* doc/m4.texinfo (Mkstemp): Update the documentation and tests.
* NEWS: Document this change.
Signed-off-by: Eric Blake <ebb9@byu.net>
(cherry picked from commit bd9900d65eb9cd5add0f107e94b513fa267495ba) |
uint32_t xffNumTrustedHops() const override { return 0; } | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 235,711,380,554,789,900,000,000,000,000,000,000,000 | 1 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
static void lo_map_init(struct lo_map *map)
{
map->elems = NULL;
map->nelems = 0;
map->freelist = -1;
} | 0 | [] | qemu | 6084633dff3a05d63176e06d7012c7e15aba15be | 24,414,775,667,412,000,000,000,000,000,000,000,000 | 6 | tools/virtiofsd: xattr name mappings: Add option
Add an option to define mappings of xattr names so that
the client and server filesystems see different views.
This can be used to have different SELinux mappings as
seen by the guest, to run the virtiofsd with less privileges
(e.g. in a case where it can't set trusted/... |
struct sk_buff *tcp_get_timestamping_opt_stats(const struct sock *sk)
{
const struct tcp_sock *tp = tcp_sk(sk);
struct sk_buff *stats;
struct tcp_info info;
stats = alloc_skb(3 * nla_total_size_64bit(sizeof(u64)), GFP_ATOMIC);
if (!stats)
return NULL;
tcp_get_info_chrono_stats(tp, &info);
nla_put_u64_64bit(s... | 0 | [
"CWE-399",
"CWE-835"
] | linux | ccf7abb93af09ad0868ae9033d1ca8108bdaec82 | 69,716,353,456,012,515,000,000,000,000,000,000,000 | 19 | 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 void tg3_enable_nvram_access(struct tg3 *tp)
{
if (tg3_flag(tp, 5750_PLUS) && !tg3_flag(tp, PROTECTED_NVRAM)) {
u32 nvaccess = tr32(NVRAM_ACCESS);
tw32(NVRAM_ACCESS, nvaccess | ACCESS_ENABLE);
}
} | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 74,231,927,860,724,910,000,000,000,000,000,000,000 | 8 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
static void * cm_copy_private_data(const void *private_data,
u8 private_data_len)
{
void *data;
if (!private_data || !private_data_len)
return NULL;
data = kmemdup(private_data, private_data_len, GFP_KERNEL);
if (!data)
return ERR_PTR(-ENOMEM);
return data;
} | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 121,111,002,550,664,570,000,000,000,000,000,000,000 | 14 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
void graphic_console_set_hwops(QemuConsole *con,
const GraphicHwOps *hw_ops,
void *opaque)
{
con->hw_ops = hw_ops;
con->hw = opaque;
} | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 232,428,529,757,616,100,000,000,000,000,000,000,000 | 7 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey)
{
if (ri->type != CMS_RECIPINFO_TRANS) {
CMSerr(CMS_F_CMS_RECIPIENTINFO_SET0_PKEY, CMS_R_NOT_KEY_TRANSPORT);
return 0;
}
EVP_PKEY_free(ri->d.ktri->pkey);
ri->d.ktri->pkey = pkey;
return 1;
} | 0 | [
"CWE-311",
"CWE-327"
] | openssl | 08229ad838c50f644d7e928e2eef147b4308ad64 | 24,575,330,220,518,373,000,000,000,000,000,000,000 | 10 | Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey
An attack is simple, if the first CMS_recipientInfo is valid but the
second CMS_recipientInfo is chosen ciphertext. If the second
recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct
encryption key will be replaced by garbage, and the mess... |
static void _slurm_rpc_job_ready(slurm_msg_t * msg)
{
int error_code, result;
job_id_msg_t *id_msg = (job_id_msg_t *) msg->data;
DEF_TIMERS;
/* Locks: read job */
slurmctld_lock_t job_read_lock = {
NO_LOCK, READ_LOCK, NO_LOCK, NO_LOCK, NO_LOCK };
slurm_msg_t response_msg;
return_code_msg_t rc_msg;
START_TIME... | 0 | [
"CWE-20"
] | slurm | 033dc0d1d28b8d2ba1a5187f564a01c15187eb4e | 284,291,843,861,806,060,000,000,000,000,000,000,000 | 39 | Fix insecure handling of job requested gid.
Only trust MUNGE signed values, unless the RPC was signed by
SlurmUser or root.
CVE-2018-10995. |
static void arcmsr_hbaC_stop_bgrb(struct AdapterControlBlock *pACB)
{
struct MessageUnit_C __iomem *reg = pACB->pmuC;
pACB->acb_flags &= ~ACB_F_MSG_START_BGRB;
writel(ARCMSR_INBOUND_MESG0_STOP_BGRB, ®->inbound_msgaddr0);
writel(ARCMSR_HBCMU_DRV2IOP_MESSAGE_CMD_DONE, ®->inbound_doorbell);
if (!arcmsr_hbaC_wai... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7bc2b55a5c030685b399bb65b6baa9ccc3d1f167 | 322,609,499,454,563,970,000,000,000,000,000,000,000 | 13 | scsi: arcmsr: Buffer overflow in arcmsr_iop_message_xfer()
We need to put an upper bound on "user_len" so the memcpy() doesn't
overflow.
Cc: <stable@vger.kernel.org>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Sig... |
static int ax88179_auto_detach(struct usbnet *dev, int in_pm)
{
u16 tmp16;
u8 tmp8;
int (*fnr)(struct usbnet *, u8, u16, u16, u16, void *);
int (*fnw)(struct usbnet *, u8, u16, u16, u16, const void *);
if (!in_pm) {
fnr = ax88179_read_cmd;
fnw = ax88179_write_cmd;
} else {
fnr = ax88179_read_cmd_nopm;
fn... | 0 | [
"CWE-787"
] | linux | 57bc3d3ae8c14df3ceb4e17d26ddf9eeab304581 | 163,839,144,871,899,980,000,000,000,000,000,000,000 | 33 | net: usb: ax88179_178a: Fix out-of-bounds accesses in RX fixup
ax88179_rx_fixup() contains several out-of-bounds accesses that can be
triggered by a malicious (or defective) USB device, in particular:
- The metadata array (hdr_off..hdr_off+2*pkt_cnt) can be out of bounds,
causing OOB reads and (on big-endian syst... |
storageConnectNumOfDefinedStoragePools(virConnectPtr conn)
{
if (virConnectNumOfDefinedStoragePoolsEnsureACL(conn) < 0)
return -1;
return virStoragePoolObjNumOfStoragePools(driver->pools, conn, false,
virConnectNumOfDefinedStoragePoolsCheckACL);
} | 0 | [] | libvirt | 447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87 | 93,838,004,646,798,630,000,000,000,000,000,000,000 | 8 | storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath
'virStoragePoolObjListSearch' returns a locked and refed object, thus we
must release it on ACL permission failure.
Fixes: 7aa0e8c0cb8
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318
Signed-off-by: Peter Krempa <pkrempa@redhat.co... |
void Http2Stream::OnDataChunk(uv_buf_t* chunk) {
CHECK(!this->IsDestroyed());
Isolate* isolate = env()->isolate();
HandleScope scope(isolate);
ssize_t len = -1;
Local<Object> buf;
if (chunk != nullptr) {
len = chunk->len;
buf = Buffer::New(isolate, chunk->base, len).ToLocalChecked();
}
EmitData(... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 171,708,677,861,857,070,000,000,000,000,000,000,000 | 12 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
struct sock *vsock_create_connected(struct sock *parent)
{
return __vsock_create(sock_net(parent), NULL, parent, GFP_KERNEL,
parent->sk_type, 0);
} | 0 | [
"CWE-667"
] | linux | c518adafa39f37858697ac9309c6cf1805581446 | 232,466,772,756,287,040,000,000,000,000,000,000,000 | 5 | vsock: fix the race conditions in multi-transport support
There are multiple similar bugs implicitly introduced by the
commit c0cfa2d8a788fcf4 ("vsock: add multi-transports support") and
commit 6a2c0962105ae8ce ("vsock: prevent transport modules unloading").
The bug pattern:
[1] vsock_sock.transport pointer is copie... |
ssize_t enc_untrusted_getxattr(const char *path, const char *name, void *value,
size_t size) {
return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_getxattr,
path, name, value, size);
} | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 324,978,419,676,635,570,000,000,000,000,000,000,000 | 5 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
juniper_atm1_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, register const u_char *p)
{
int llc_hdrlen;
struct juniper_l2info_t l2info;
l2info.pictype = DLT_JUNIPER_ATM1;
if (juniper_parse_header(ndo, p, h, &l2info) == 0)
return l2info.header... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 179,031,425,222,972,800,000,000,000,000,000,000,000 | 37 | CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print().
This fixes a buffer over-read discovered by Kamil Frankowicz.
Don't pass the remaining caplen - that's too hard to get right, and we
were getting it wrong in at least one case; just use ND_TTEST().
Add a test using the capture file sup... |
enum ha_base_keytype key_type() const { return HA_KEYTYPE_ULONGLONG; } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 144,662,120,775,489,900,000,000,000,000,000,000,000 | 1 | 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... |
MonoArray*
mono_reflection_get_custom_attrs_blob (MonoReflectionAssembly *assembly, MonoObject *ctor, MonoArray *ctorArgs, MonoArray *properties, MonoArray *propValues, MonoArray *fields, MonoArray* fieldValues)
{
MonoArray *result;
MonoMethodSignature *sig;
MonoObject *arg;
char *buffer, *p;
guint32 buflen, i;
... | 0 | [
"CWE-20"
] | mono | 4905ef1130feb26c3150b28b97e4a96752e0d399 | 102,755,620,070,830,530,000,000,000,000,000,000,000 | 72 | 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 |
rend_service_begin_parse_intro(const uint8_t *request,
size_t request_len,
uint8_t type,
char **err_msg_out)
{
rend_intro_cell_t *rv = NULL;
char *err_msg = NULL;
if (!request || request_len <= 0) goto err;
if (!(type ... | 0 | [
"CWE-532"
] | tor | 09ea89764a4d3a907808ed7d4fe42abfe64bd486 | 245,560,265,724,059,570,000,000,000,000,000,000,000 | 57 | Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.
TROVE-2017-008
CVE-2017-0380 |
struct dentry *kern_path_locked(const char *name, struct path *path)
{
struct filename *filename = getname_kernel(name);
struct nameidata nd;
struct dentry *d;
int err;
if (IS_ERR(filename))
return ERR_CAST(filename);
err = filename_lookup(AT_FDCWD, filename, LOOKUP_PARENT, &nd);
if (err) {
d = ERR_PTR(err... | 0 | [
"CWE-416"
] | linux | f15133df088ecadd141ea1907f2c96df67c729f0 | 64,644,250,480,151,710,000,000,000,000,000,000,000 | 32 | path_openat(): fix double fput()
path_openat() jumps to the wrong place after do_tmpfile() - it has
already done path_cleanup() (as part of path_lookupat() called by
do_tmpfile()), so doing that again can lead to double fput().
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
operator()(Halfedge_handle e, const Tag_true& ) const
{
return D_.face(e)==f_ || D_.face(D_.twin(e))==f_;
} | 0 | [
"CWE-269"
] | cgal | 618b409b0fbcef7cb536a4134ae3a424ef5aae45 | 196,521,565,289,887,730,000,000,000,000,000,000,000 | 4 | Fix Nef_2 and Nef_S2 IO |
bool handlers_empty() const { return handlers_.empty(); } | 0 | [] | nghttp2 | 95efb3e19d174354ca50c65d5d7227d92bcd60e1 | 242,162,295,606,703,550,000,000,000,000,000,000,000 | 1 | Don't read too greedily |
static inline int tcp_fin_time(const struct sock *sk)
{
int fin_timeout = tcp_sk(sk)->linger2 ? : sock_net(sk)->ipv4.sysctl_tcp_fin_timeout;
const int rto = inet_csk(sk)->icsk_rto;
if (fin_timeout < (rto << 2) - (rto >> 1))
fin_timeout = (rto << 2) - (rto >> 1);
return fin_timeout;
} | 0 | [
"CWE-416",
"CWE-269"
] | linux | bb1fceca22492109be12640d49f5ea5a544c6bb4 | 74,447,594,894,468,820,000,000,000,000,000,000,000 | 10 | tcp: fix use after free in tcp_xmit_retransmit_queue()
When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()
Then it attempts to copy user data into this fresh skb.
If the copy fails, we undo the work and remove the fresh skb.
Unfortunately, t... |
static void MSLEndElement(void *context,const xmlChar *tag)
{
ssize_t
n;
MSLInfo
*msl_info;
/*
Called when the end of an element has been detected.
*/
(void) LogMagickEvent(CoderEvent,GetMagickModule()," SAX.endElement(%s)",
tag);
msl_info=(MSLInfo *) context;
n=msl_info->n;
switch (*... | 0 | [
"CWE-772"
] | ImageMagick6 | bb77f9e905597c7ab1e92042c7de418d999b00bf | 146,768,956,227,395,800,000,000,000,000,000,000,000 | 95 | Fixed leaking of the image when writing an MSL image. |
dnsc_shared_secrets_delkeyfunc(void *k, void* ATTR_UNUSED(arg))
{
struct shared_secret_cache_key* ssk = (struct shared_secret_cache_key*)k;
lock_rw_destroy(&ssk->entry.lock);
free(ssk);
} | 0 | [
"CWE-190"
] | unbound | 02080f6b180232f43b77f403d0c038e9360a460f | 217,737,258,242,144,670,000,000,000,000,000,000,000 | 6 | - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec. |
static int fixed_mtrr_addr_to_seg(u64 addr)
{
struct fixed_mtrr_segment *mtrr_seg;
int seg, seg_num = ARRAY_SIZE(fixed_seg_table);
for (seg = 0; seg < seg_num; seg++) {
mtrr_seg = &fixed_seg_table[seg];
if (mtrr_seg->start <= addr && addr < mtrr_seg->end)
return seg;
}
return -1;
} | 0 | [
"CWE-284"
] | linux | 9842df62004f366b9fed2423e24df10542ee0dc5 | 168,039,834,043,308,320,000,000,000,000,000,000,000 | 13 | KVM: MTRR: remove MSR 0x2f8
MSR 0x2f8 accessed the 124th Variable Range MTRR ever since MTRR support
was introduced by 9ba075a664df ("KVM: MTRR support").
0x2f8 became harmful when 910a6aae4e2e ("KVM: MTRR: exactly define the
size of variable MTRRs") shrinked the array of VR MTRRs from 256 to 8,
which made access to ... |
void WebContents::PasteAndMatchStyle() {
web_contents()->PasteAndMatchStyle();
} | 0 | [] | electron | e9fa834757f41c0b9fe44a4dffe3d7d437f52d34 | 223,143,864,529,759,450,000,000,000,000,000,000,000 | 3 | 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
... |
f_setwinvar(typval_T *argvars, typval_T *rettv UNUSED)
{
if (in_vim9script()
&& (check_for_number_arg(argvars, 0) == FAIL
|| check_for_string_arg(argvars, 1) == FAIL))
return;
setwinvar(argvars, 0);
} | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 121,831,989,678,385,440,000,000,000,000,000,000,000 | 9 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
void iov_iter_bvec(struct iov_iter *i, int direction,
const struct bio_vec *bvec, unsigned long nr_segs,
size_t count)
{
BUG_ON(!(direction & ITER_BVEC));
i->type = direction;
i->bvec = bvec;
i->nr_segs = nr_segs;
i->iov_offset = 0;
i->count = count;
} | 0 | [
"CWE-200"
] | linux | b9dc6f65bc5e232d1c05fe34b5daadc7e8bbf1fb | 113,739,420,224,955,600,000,000,000,000,000,000,000 | 11 | fix a fencepost error in pipe_advance()
The logics in pipe_advance() used to release all buffers past the new
position failed in cases when the number of buffers to release was equal
to pipe->buffers. If that happened, none of them had been released,
leaving pipe full. Worse, it was trivial to trigger and we end up ... |
SWTPM_CheckHMAC(tlv_data *hmac, tlv_data *encrypted_data,
const TPM_SYMMETRIC_KEY_DATA *tpm_symmetric_key_token,
const unsigned char *ivec, uint32_t ivec_length)
{
const unsigned char *data;
uint32_t data_length;
unsigned int md_len;
unsigned char md[EVP_MAX_MD_SIZE];
... | 0 | [] | swtpm | cae5991423826f21b11f7a5bc7f7b2b538bde2a2 | 102,670,743,510,949,260,000,000,000,000,000,000,000 | 36 | swtpm: Do not follow symlinks when opening lockfile (CVE-2020-28407)
This patch addresses CVE-2020-28407.
Prevent us from following symliks when we open the lockfile
for writing.
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> |
static void perf_event_enable_on_exec(int ctxn)
{
struct perf_event_context *ctx, *clone_ctx = NULL;
struct perf_cpu_context *cpuctx;
struct perf_event *event;
unsigned long flags;
int enabled = 0;
local_irq_save(flags);
ctx = current->perf_event_ctxp[ctxn];
if (!ctx || !ctx->nr_events)
goto out;
cpuctx = ... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 65,982,984,897,491,440,000,000,000,000,000,000,000 | 34 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
check_for_string_or_func_arg(typval_T *args, int idx)
{
if (args[idx].v_type != VAR_PARTIAL
&& args[idx].v_type != VAR_FUNC
&& args[idx].v_type != VAR_STRING)
{
semsg(_(e_string_or_function_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
} | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 125,334,884,475,490,040,000,000,000,000,000,000,000 | 11 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
xmlSAXUserParseFile(xmlSAXHandlerPtr sax, void *user_data,
const char *filename) {
int ret = 0;
xmlParserCtxtPtr ctxt;
ctxt = xmlCreateFileParserCtxt(filename);
if (ctxt == NULL) return -1;
if (ctxt->sax != (xmlSAXHandlerPtr) &xmlDefaultSAXHandler)
xmlFree(ctxt->sax);
ctxt-... | 0 | [
"CWE-119"
] | libxml2 | 6a36fbe3b3e001a8a840b5c1fdd81cefc9947f0d | 246,510,422,153,762,800,000,000,000,000,000,000,000 | 35 | Fix potential out of bound access |
}
void free_last_set(REP_SETS *sets)
{
sets->count--;
sets->extra++; | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 173,829,533,125,516,620,000,000,000,000,000,000,000 | 6 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
ex_pwd(exarg_T *eap UNUSED)
{
if (mch_dirname(NameBuff, MAXPATHL) == OK)
{
#ifdef BACKSLASH_IN_FILENAME
slash_adjust(NameBuff);
#endif
if (p_verbose > 0)
{
char *context = "global";
if (last_chdir_reason != NULL)
context = last_chdir_reason;
else if (curwin->w_localdir != NULL)
context = ... | 0 | [
"CWE-416"
] | vim | e031fe90cf2e375ce861ff5e5e281e4ad229ebb9 | 131,983,371,761,335,040,000,000,000,000,000,000,000 | 25 | patch 8.2.3741: using freed memory in open command
Problem: Using freed memory in open command.
Solution: Make a copy of the current line. |
MOBI_RET mobi_reconstruct_orth(const MOBIRawml *rawml, MOBIFragment *first, size_t *new_size) {
MOBITrie *infl_trie = NULL;
bool is_infl_v2 = mobi_indx_has_tag(rawml->orth, INDX_TAGARR_ORTH_INFL);
bool is_infl_v1 = false;
if (is_infl_v2 == false) {
is_infl_v1 = mobi_indx_has_tag(rawml->infl, IND... | 0 | [
"CWE-703",
"CWE-125"
] | libmobi | fb1ab50e448ddbed746fd27ae07469bc506d838b | 276,822,032,415,671,200,000,000,000,000,000,000,000 | 123 | Fix array boundary check when parsing inflections which could result in buffer over-read with corrupt input |
TEST(RouterFilterUtilityTest, SetUpstreamScheme) {
TestScopedRuntime scoped_runtime;
// With no scheme and x-forwarded-proto, set scheme based on encryption level
{
Http::TestRequestHeaderMapImpl headers;
FilterUtility::setUpstreamScheme(headers, false, false);
EXPECT_EQ("http", headers.get_(":scheme... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 242,174,381,663,913,300,000,000,000,000,000,000,000 | 56 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
ulong STDCALL
mysql_get_server_version(MYSQL *mysql)
{
ulong major= 0, minor= 0, version= 0;
if (mysql->server_version)
{
char *pos= mysql->server_version, *end_pos;
major= strtoul(pos, &end_pos, 10); pos=end_pos+1;
minor= strtoul(pos, &end_pos, 10); pos=end_pos+1;
version= strtoul(pos, &end_... | 0 | [
"CWE-254"
] | mysql-server | 13380bf81f6bc20d39549f531f9acebdfb5a8c37 | 268,666,771,558,784,050,000,000,000,000,000,000,000 | 18 | Bug #22295186: CERTIFICATE VALIDATION BUG IN MYSQL MAY ALLOW MITM |
static int check_direct_IO(struct inode *inode, struct iov_iter *iter,
loff_t offset)
{
unsigned i_blkbits = READ_ONCE(inode->i_blkbits);
unsigned blkbits = i_blkbits;
unsigned blocksize_mask = (1 << blkbits) - 1;
unsigned long align = offset | iov_iter_alignment(iter);
struct block_device *bdev = inode->i_s... | 0 | [
"CWE-476"
] | linux | 4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6 | 3,562,094,780,025,009,000,000,000,000,000,000,000 | 19 | f2fs: support swap file w/ DIO
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> |
int update_approximate_dstblt_order(ORDER_INFO* orderInfo, const DSTBLT_ORDER* dstblt)
{
return 32;
} | 0 | [
"CWE-415"
] | FreeRDP | 67c2aa52b2ae0341d469071d1bc8aab91f8d2ed8 | 321,490,037,384,884,240,000,000,000,000,000,000,000 | 4 | Fixed #6013: Check new length is > 0 |
bool subselect_rowid_merge_engine::partial_match()
{
Ordered_key *min_key; /* Key that contains the current minimum position. */
rownum_t min_row_num; /* Current row number of min_key. */
Ordered_key *cur_key;
rownum_t cur_row_num;
uint count_nulls_in_search_key= 0;
uint max_null_in_any_row=
((select_ma... | 0 | [
"CWE-89"
] | server | 3c209bfc040ddfc41ece8357d772547432353fd2 | 310,938,160,304,615,170,000,000,000,000,000,000,000 | 177 | MDEV-25994: Crash with union of my_decimal type in ORDER BY clause
When single-row subquery fails with "Subquery reutrns more than 1 row"
error, it will raise an error and return NULL.
On the other hand, Item_singlerow_subselect sets item->maybe_null=0
for table-less subqueries like "(SELECT not_null_value)" (*)
Th... |
static void GCompletionDestroy(GCompletionField *gc) {
int i;
if ( gc->choice_popup!=NULL ) {
GWindow cp = gc->choice_popup;
gc->choice_popup = NULL;
GDrawSetUserData(cp,NULL);
GDrawDestroyWindow(cp);
}
if ( gc->choices!=NULL ) {
for ( i=0; gc->choices[i]!=NULL; ++i )
free(gc->choices[i]);
f... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 246,426,540,284,720,630,000,000,000,000,000,000,000 | 16 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
struct yang_data *yang_data_new_uint16(const char *xpath, uint16_t value)
{
char value_str[BUFSIZ];
snprintf(value_str, sizeof(value_str), "%u", value);
return yang_data_new(xpath, value_str);
} | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 173,861,001,580,070,800,000,000,000,000,000,000,000 | 7 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
void SSL_set_debug(SSL *s, int debug)
{
s->debug = debug;
} | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 84,131,644,156,208,020,000,000,000,000,000,000,000 | 4 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
read_eeprom (long ioaddr, int eep_addr)
{
int i = 1000;
outw (EEP_READ | (eep_addr & 0xff), ioaddr + EepromCtrl);
while (i-- > 0) {
if (!(inw (ioaddr + EepromCtrl) & EEP_BUSY)) {
return inw (ioaddr + EepromData);
}
}
return 0;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | 1bb57e940e1958e40d51f2078f50c3a96a9b2d75 | 141,923,629,051,667,300,000,000,000,000,000,000,000 | 11 | dl2k: Clean up rio_ioctl
The dl2k driver's rio_ioctl call has a few issues:
- No permissions checking
- Implements SIOCGMIIREG and SIOCGMIIREG using the SIOCDEVPRIVATE numbers
- Has a few ioctls that may have been used for debugging at one point
but have no place in the kernel proper.
This patch removes all but the... |
cmsBool CMSEXPORT cmsCloseProfile(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
cmsBool rc = TRUE;
cmsUInt32Number i;
if (!Icc) return FALSE;
// Was open in write mode?
if (Icc ->IsWrite) {
Icc ->IsWrite = FALSE; // Assure no further writting
... | 0 | [] | Little-CMS | 886e2f524268efe8a1c3aa838c28e446fda24486 | 336,613,693,158,219,000,000,000,000,000,000,000,000 | 40 | Fixes from coverity check |
debug_print_pgrps ()
{
itrace("original_pgrp = %ld shell_pgrp = %ld terminal_pgrp = %ld",
(long)original_pgrp, (long)shell_pgrp, (long)terminal_pgrp);
itrace("tcgetpgrp(%d) -> %ld, getpgid(0) -> %ld",
shell_tty, (long)tcgetpgrp (shell_tty), (long)getpgid(0));
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 94,474,402,797,713,300,000,000,000,000,000,000,000 | 7 | bash-4.4-rc2 release |
inline bool Item_sp_variable::const_item() const
{
return TRUE;
} | 0 | [] | mysql-server | f7316aa0c9a3909fc7498e7b95d5d3af044a7e21 | 236,479,799,019,215,970,000,000,000,000,000,000,000 | 4 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME', NULL))
Backport of Bug#19143243 fix.
NAME_CONST item can return NULL_ITEM type in case of incorrect arguments.
NULL_ITEM has special processing in Item_func_in function.
In Item_func_in::fix_length_and_dec an a... |
void LIRGenerator::do_MathIntrinsic(Intrinsic* x) {
assert(x->number_of_arguments() == 1 || (x->number_of_arguments() == 2 && x->id() == vmIntrinsics::_dpow), "wrong type");
if (x->id() == vmIntrinsics::_dexp || x->id() == vmIntrinsics::_dlog ||
x->id() == vmIntrinsics::_dpow || x->id() == vmIntrinsics::_dco... | 0 | [] | jdk17u | 268c0159253b3de5d72eb826ef2329b27bb33fea | 150,791,548,862,184,370,000,000,000,000,000,000,000 | 43 | 8272014: Better array indexing
Reviewed-by: thartmann
Backport-of: 937c31d896d05aa24543b74e98a2ea9f05b5d86f |
static inline void convertGfxShortColor(SplashColorPtr dest,
SplashColorMode colorMode,
GfxColorSpace *colorSpace,
GfxColor *src) {
switch (colorMode) {
case splashModeMono1:
case splashModeMono8:
{
... | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 280,039,212,726,558,200,000,000,000,000,000,000,000 | 48 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
static int emulator_check_intercept(struct x86_emulate_ctxt *ctxt,
enum x86_intercept intercept,
enum x86_intercept_stage stage)
{
struct x86_instruction_info info = {
.intercept = intercept,
.rep_prefix = ctxt->rep_prefix,
.modrm_mod = ctxt->modrm_mod,
.modrm_reg = ctxt->modrm_reg,
.modrm... | 0 | [] | kvm | d1442d85cc30ea75f7d399474ca738e0bc96f715 | 166,209,357,174,904,480,000,000,000,000,000,000,000 | 20 | KVM: x86: Handle errors when RIP is set during far jumps
Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not
handle this case, and may result in failed vm-entry once the assignment is
done. The tricky part of doing so is that loading the new CS affects the
VMCS/VMCB state, so if we fail during... |
static int descriptor_modify(struct ldb_module *module, struct ldb_request *req)
{
struct ldb_context *ldb = ldb_module_get_ctx(module);
struct ldb_request *mod_req;
struct ldb_message *msg;
struct ldb_result *current_res, *parent_res;
const struct ldb_val *old_sd = NULL;
const struct ldb_val *parent_sd = NULL;
... | 1 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 113,849,357,704,879,350,000,000,000,000,000,000,000 | 241 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
fr_window_stop_batch (FrWindow *window)
{
if (! window->priv->batch_mode) {
fr_window_free_batch_data (window);
window->priv->reload_archive = FALSE;
return;
}
window->priv->extract_interact_use_default_dir = FALSE;
if (! window->priv->showing_error_dialog) {
g_signal_emit (window,
fr_window_sig... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 85,252,909,762,976,670,000,000,000,000,000,000,000 | 18 | libarchive: sanitize filenames before extracting |
static int selinux_shm_alloc_security(struct shmid_kernel *shp)
{
struct ipc_security_struct *isec;
struct common_audit_data ad;
u32 sid = current_sid();
int rc;
rc = ipc_alloc_security(current, &shp->shm_perm, SECCLASS_SHM);
if (rc)
return rc;
isec = shp->shm_perm.security;
ad.type = LSM_AUDIT_DATA_IPC;
... | 0 | [
"CWE-264"
] | linux | 7b0d0b40cd78cadb525df760ee4cac151533c2b5 | 71,986,516,728,518,820,000,000,000,000,000,000,000 | 24 | selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID.
If the callee SID is bounded by the caller SID, then allowing
the transition to occur poses no risk of privilege escalation and we can
therefore safely allow the transition to occur. Add this exemption
for both the case where a transition was explicitl... |
uint32_t smb1cli_conn_server_session_key(struct smbXcli_conn *conn)
{
return conn->smb1.server.session_key;
} | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 90,054,656,230,610,970,000,000,000,000,000,000,000 | 4 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
_clone_pdu_header(netsnmp_pdu *pdu)
{
netsnmp_pdu *newpdu;
struct snmp_secmod_def *sptr;
int ret;
if (!pdu)
return NULL;
newpdu = (netsnmp_pdu *) malloc(sizeof(netsnmp_pdu));
if (!newpdu)
return NULL;
memmove(newpdu, pdu, sizeof(netsnmp_pdu));
/*
* reset copied... | 1 | [
"CWE-415"
] | net-snmp | 5f881d3bf24599b90d67a45cae7a3eb099cd71c9 | 226,147,770,919,947,900,000,000,000,000,000,000,000 | 72 | libsnmp, USM: Introduce a reference count in struct usmStateReference
This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/. |
inline uint64_t make_type() { return 0; } | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 3,971,789,516,274,418,400,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
static __init int cpu_has_kvm_support(void)
{
return cpu_has_vmx();
} | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 154,249,822,371,643,300,000,000,000,000,000,000,000 | 4 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
static int sasl_sc_sasl2dn( Operation *op, SlapReply *rs )
{
struct berval *ndn = op->o_callback->sc_private;
if ( rs->sr_type != REP_SEARCH ) return LDAP_SUCCESS;
/* We only want to be called once */
if ( !BER_BVISNULL( ndn ) ) {
op->o_tmpfree( ndn->bv_val, op->o_tmpmemctx );
BER_BVZERO( ndn );
Debug( LDA... | 0 | [
"CWE-617"
] | openldap | 02dfc32d658fadc25e4040f78e36592f6e1e1ca0 | 39,823,800,616,245,075,000,000,000,000,000,000,000 | 20 | ITS#9406 fix debug msg |
bool Scanner::fill(size_t need)
{
if (eof) return false;
pop_finished_files();
DASSERT(bot <= tok && tok <= lim);
size_t free = static_cast<size_t>(tok - bot);
size_t copy = static_cast<size_t>(lim - tok);
if (free >= need) {
memmove(bot, tok, copy);
shift_ptrs_and_fpos(-stati... | 0 | [
"CWE-787"
] | re2c | c4603ba5ce229db83a2a4fb93e6d4b4e3ec3776a | 151,319,979,079,810,560,000,000,000,000,000,000,000 | 36 | Fix crash in lexer refill (reported by Agostino Sarubbo).
The crash happened in a rare case of a very long lexeme that doen't fit
into the buffer, forcing buffer reallocation.
The crash was caused by an incorrect calculation of the shift offset
(it was smaller than necessary). As a consequence, the data from buffer
s... |
int diskutil_loop_check(const char *path, const char *lodev)
{
int ret = EUCA_OK;
char *output = NULL;
char *oparen = NULL;
char *cparen = NULL;
if (path && lodev) {
output = pruntf(TRUE, "%s %s %s", helpers_path[ROOTWRAP], helpers_path[LOSETUP], lodev);
if (output == NULL)
... | 0 | [] | eucalyptus | c252889a46f41b4c396b89e005ec89836f2524be | 181,502,584,493,547,900,000,000,000,000,000,000,000 | 45 | Input validation, shellout hardening on back-end
- validating bucketName and bucketPath in BundleInstance
- validating device name in Attach and DetachVolume
- removed some uses of system() and popen()
Fixes EUCA-7572, EUCA-7520 |
onig_builtin_mismatch(OnigCalloutArgs* args ARG_UNUSED, void* user_data ARG_UNUSED)
{
return ONIG_MISMATCH;
} | 0 | [
"CWE-125"
] | oniguruma | d3e402928b6eb3327f8f7d59a9edfa622fec557b | 128,784,314,251,796,220,000,000,000,000,000,000,000 | 4 | fix heap-buffer-overflow |
static int shadow_copy2_lstat(vfs_handle_struct *handle,
struct smb_filename *smb_fname)
{
time_t timestamp;
char *stripped, *tmp;
int ret, saved_errno;
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle,
smb_fname->base_name,
×tamp, &stripped)) {
return -1;
}
if (timestamp == 0) {... | 0 | [
"CWE-200"
] | samba | 675fd8d771f9d43e354dba53ddd9b5483ae0a1d7 | 128,595,838,705,361,020,000,000,000,000,000,000,000 | 38 | CVE-2015-5299: s3-shadow-copy2: fix missing access check on snapdir
Fix originally from <partha@exablox.com>
https://bugzilla.samba.org/show_bug.cgi?id=11529
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org> |
static int read_entry(
git_index_entry **out,
size_t *out_size,
git_index *index,
const void *buffer,
size_t buffer_size,
const char *last)
{
size_t path_length, entry_size;
const char *path_ptr;
struct entry_short source;
git_index_entry entry = {{0}};
bool compressed = index->version >= INDEX_VERSION_NUMBE... | 1 | [
"CWE-415",
"CWE-190"
] | libgit2 | 3207ddb0103543da8ad2139ec6539f590f9900c1 | 100,808,018,942,178,500,000,000,000,000,000,000,000 | 103 | index: fix out-of-bounds read with invalid index entry prefix length
The index format in version 4 has prefix-compressed entries, where every
index entry can compress its path by using a path prefix of the previous
entry. Since implmenting support for this index format version in commit
5625d86b9 (index: support index... |
void CLASS canon_sraw_load_raw()
{
struct jhead jh;
short *rp=0, (*ip)[4];
int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c;
int v[3]={0,0,0}, ver, hue;
#ifdef LIBRAW_LIBRARY_BUILD
int saved_w = width, saved_h = height;
#endif
char *cp;
if (!ljpeg_start (&jh, 0) || jh.clrs < 4) return;
... | 0 | [
"CWE-119",
"CWE-125",
"CWE-787"
] | LibRaw | d13e8f6d1e987b7491182040a188c16a395f1d21 | 154,734,733,463,111,470,000,000,000,000,000,000,000 | 154 | CVE-2017-1438 credits; fix for Kodak 65000 out of bounds access |
nv_object(
cmdarg_T *cap)
{
int flag;
int include;
char_u *mps_save;
if (cap->cmdchar == 'i')
include = FALSE; // "ix" = inner object: exclude white space
else
include = TRUE; // "ax" = an object: include white space
// Make sure (), [], {} and <> are in 'matchpairs'
mps_sav... | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 172,185,206,765,757,520,000,000,000,000,000,000,000 | 80 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
CImgList<T>& assign(const CImg<t1>& img1, const CImg<t2>& img2, const CImg<t3>& img3, const CImg<t4>& img4,
const CImg<t5>& img5, const CImg<t6>& img6, const bool is_shared=false) {
assign(6);
_data[0].assign(img1,is_shared); _data[1].assign(img2,is_shared); _data[2].assign(img3,... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 218,992,871,945,636,900,000,000,000,000,000,000,000 | 7 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
IMAP_DATA* imap_conn_find (const ACCOUNT* account, int flags)
{
CONNECTION* conn = NULL;
ACCOUNT* creds = NULL;
IMAP_DATA* idata = NULL;
int new = 0;
while ((conn = mutt_conn_find (conn, account)))
{
if (!creds)
creds = &conn->account;
else
memcpy (&conn->account, creds, sizeof (ACCOUNT... | 0 | [
"CWE-200",
"CWE-319"
] | mutt | 3e88866dc60b5fa6aaba6fd7c1710c12c1c3cd01 | 33,632,509,815,435,655,000,000,000,000,000,000,000 | 103 | Prevent possible IMAP MITM via PREAUTH response.
This is similar to CVE-2014-2567 and CVE-2020-12398. STARTTLS is not
allowed in the Authenticated state, so previously Mutt would
implicitly mark the connection as authenticated and skip any
encryption checking/enabling.
No credentials are exposed, but it does allow m... |
static bool hid_match_one_id(struct hid_device *hdev,
const struct hid_device_id *id)
{
return (id->bus == HID_BUS_ANY || id->bus == hdev->bus) &&
(id->group == HID_GROUP_ANY || id->group == hdev->group) &&
(id->vendor == HID_ANY_ID || id->vendor == hdev->vendor) &&
(id->product == HID_ANY_ID || id->product ==... | 0 | [
"CWE-125"
] | linux | 50220dead1650609206efe91f0cc116132d59b3f | 77,421,041,861,375,720,000,000,000,000,000,000,000 | 8 | HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.
The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.
Signed-off-by: Benjamin Tis... |
static void printk_stack_address(unsigned long address, int reliable,
char *log_lvl)
{
touch_nmi_watchdog();
printk("%s %s%pB\n", log_lvl, reliable ? "" : "? ", (void *)address);
} | 0 | [
"CWE-20"
] | linux | 342db04ae71273322f0011384a9ed414df8bdae4 | 165,324,468,355,977,610,000,000,000,000,000,000,000 | 6 | x86/dumpstack: Don't dump kernel memory based on usermode RIP
show_opcodes() is used both for dumping kernel instructions and for dumping
user instructions. If userspace causes #PF by jumping to a kernel address,
show_opcodes() can be reached with regs->ip controlled by the user,
pointing to kernel code. Make sure th... |
_PUBLIC_ char *strupper_talloc_n_handle(struct smb_iconv_handle *iconv_handle,
TALLOC_CTX *ctx, const char *src, size_t n)
{
size_t size=0;
char *dest;
if (!src) {
return NULL;
}
/* this takes advantage of the fact that upper/lower can't
change the length of a character by more than 1 byte */
dest = ... | 1 | [
"CWE-200"
] | samba | ba5dbda6d0174a59d221c45cca52ecd232820d48 | 60,720,768,758,998,235,000,000,000,000,000,000,000 | 41 | CVE-2015-5330: Fix handling of unicode near string endings
Until now next_codepoint_ext() and next_codepoint_handle_ext() were
using strnlen(str, 5) to determine how much string they should try to
decode. This ended up looking past the end of the string when it was not
null terminated and the final character looked li... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.