func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
fail_desc_t(const int err, std::string path)
: err(err),
path(std::move(path)) {
} | 0 | [
"CWE-770"
] | ceph | ab29bed2fc9f961fe895de1086a8208e21ddaddc | 113,840,204,338,570,680,000,000,000,000,000,000,000 | 4 | rgw: fix issues with 'enforce bounds' patch
The patch to enforce bounds on max-keys/max-uploads/max-parts had a few
issues that would prevent us from compiling it. Instead of changing the
code provided by the submitter, we're addressing them in a separate
commit to maintain the DCO.
Signed-off-by: Joao Eduardo Luis <... |
char *MACH0_(get_cpusubtype_from_hdr)(struct MACH0_(mach_header) *hdr) {
r_return_val_if_fail (hdr, NULL);
return strdup (cpusubtype_tostring (hdr->cputype, hdr->cpusubtype));
} | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 0052500c1ed5bf8263b26b9fd7773dbdc6f170c4 | 317,493,663,941,089,000,000,000,000,000,000,000,000 | 4 | Fix heap OOB read in macho.iterate_chained_fixups ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer 'tests_65305'
mrmacete:
* Return early if segs_count is 0
* Initialize segs_count also for reconstructed fixups
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Francesco Tamagni <mrm... |
mono_thread_pop_appdomain_ref (void)
{
MonoInternalThread *thread = mono_thread_internal_current ();
if (thread) {
/* printf ("POP REF: %"G_GSIZE_FORMAT" -> %s.\n", (gsize)thread->tid, ((MonoDomain*)(thread->appdomain_refs->data))->friendly_name); */
SPIN_LOCK (thread->lock_thread_id);
ref_stack_pop (thread->a... | 0 | [
"CWE-399",
"CWE-264"
] | mono | 722f9890f09aadfc37ae479e7d946d5fc5ef7b91 | 199,995,929,750,389,100,000,000,000,000,000,000,000 | 11 | Fix access to freed members of a dead thread
* threads.c: Fix access to freed members of a dead thread. Found
and fixed by Rodrigo Kumpera <rkumpera@novell.com>
Ref: CVE-2011-0992 |
send_all_attrs(Slapi_Entry *e, char **attrs, Slapi_Operation *op, Slapi_PBlock *pb, BerElement *ber, int attrsonly, int ldapversion, int real_attrs_only, int some_named_attrs, int alloperationalattrs, int alluserattrs)
{
int i = 0;
int rc = 0;
int typelist_flags = 0;
vattr_type_thang *typelist = NULL;
... | 0 | [
"CWE-399",
"CWE-203"
] | 389-ds-base | cc0f69283abc082488824702dae485b8eae938bc | 314,600,875,380,225,430,000,000,000,000,000,000,000 | 194 | Issue 4480 - Unexpected info returned to ldap request (#4491)
Bug description:
If the bind entry does not exist, the bind result info
reports that 'No such entry'. It should not give any
information if the target entry exists or not
Fix description:
Does not return any additional information d... |
static void checklimit (FuncState *fs, int v, int l, const char *what) {
if (v > l) errorlimit(fs, l, what);
} | 0 | [
"CWE-125"
] | lua | 1f3c6f4534c6411313361697d98d1145a1f030fa | 271,152,689,671,140,020,000,000,000,000,000,000,000 | 3 | Bug: Lua can generate wrong code when _ENV is <const> |
static void virDomainObjDispose(void *obj)
{
virDomainObjPtr dom = obj;
VIR_DEBUG("obj=%p", dom);
virCondDestroy(&dom->cond);
virDomainDefFree(dom->def);
virDomainDefFree(dom->newDef);
if (dom->privateDataFreeFunc)
(dom->privateDataFreeFunc)(dom->privateData);
virDomainSnapshotObj... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 259,424,836,373,717,170,000,000,000,000,000,000,000 | 15 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
int ConnectionImpl::setAndCheckCallbackStatus(Status&& status) {
ASSERT(codec_status_.ok());
codec_status_ = std::move(status);
return codec_status_.ok() ? parser_->statusToInt(ParserStatus::Success)
: parser_->statusToInt(ParserStatus::Error);
} | 0 | [
"CWE-416"
] | envoy | fe7c69c248f4fe5a9080c7ccb35275b5218bb5ab | 217,720,235,291,391,840,000,000,000,000,000,000,000 | 6 | internal redirect: fix a lifetime bug (#785)
Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
static void io_poll_queue_proc(struct file *file, struct wait_queue_head *head,
struct poll_table_struct *p)
{
struct io_poll_table *pt = container_of(p, struct io_poll_table, pt);
__io_queue_proc(&pt->req->poll, pt, head, (struct io_poll_iocb **) &pt->req->async_data); | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 13,862,715,735,547,952,000,000,000,000,000,000,000 | 7 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
static int hash_accept(struct socket *sock, struct socket *newsock, int flags)
{
struct sock *sk = sock->sk;
struct alg_sock *ask = alg_sk(sk);
struct hash_ctx *ctx = ask->private;
struct ahash_request *req = &ctx->req;
char state[crypto_ahash_statesize(crypto_ahash_reqtfm(req))];
struct sock *sk2;
struct alg_so... | 1 | [
"CWE-476"
] | linux | 4afa5f9617927453ac04b24b584f6c718dfb4f45 | 187,818,577,584,273,600,000,000,000,000,000,000,000 | 33 | crypto: algif_hash - Only export and import on sockets with data
The hash_accept call fails to work on sockets that have not received
any data. For some algorithm implementations it may cause crashes.
This patch fixes this by ensuring that we only export and import on
sockets that have received data.
Cc: stable@vge... |
static int amd_gpio_irq_set_type(struct irq_data *d, unsigned int type)
{
int ret = 0;
u32 pin_reg;
unsigned long flags;
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
struct amd_gpio *gpio_dev = gpiochip_get_data(gc);
spin_lock_irqsave(&gpio_dev->lock, flags);
pin_reg = readl(gpio_dev->base + (d->hwirq)... | 0 | [
"CWE-415"
] | linux | 251e22abde21833b3d29577e4d8c7aaccd650eee | 324,816,185,218,614,670,000,000,000,000,000,000,000 | 68 | pinctrl: amd: Use devm_pinctrl_register() for pinctrl registration
Use devm_pinctrl_register() for pin control registration and clean
error path.
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org> |
void mark_down_all() override {
shutdown_connections(true);
} | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 151,201,111,256,812,000,000,000,000,000,000,000,000 | 3 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
long do_shmat(int shmid, char __user *shmaddr, int shmflg, ulong *raddr,
unsigned long shmlba)
{
struct shmid_kernel *shp;
unsigned long addr;
unsigned long size;
struct file *file;
int err;
unsigned long flags;
unsigned long prot;
int acc_mode;
struct ipc_namespace *ns;
struct shm_file_data *sfd;
... | 0 | [
"CWE-362",
"CWE-401"
] | linux | b9a532277938798b53178d5a66af6e2915cb27cf | 140,318,939,732,979,770,000,000,000,000,000,000,000 | 156 | Initialize msg/shm IPC objects before doing ipc_addid()
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state c... |
void JNIid::deallocate(JNIid* current) {
while (current != NULL) {
JNIid* next = current->next();
delete current;
current = next;
}
} | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 126,817,007,063,246,040,000,000,000,000,000,000,000 | 7 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
TEST(IndexBoundsBuilderTest, TranslateGtMaxKeyDoesNotGenerateBounds) {
auto testIndex = buildSimpleIndexEntry();
BSONObj obj = BSON("a" << BSON("$gt" << MAXKEY));
auto expr = parseMatchExpression(obj);
BSONElement elt = obj.firstElement();
OrderedIntervalList oil;
IndexBoundsBuilder::BoundsTight... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 204,699,307,840,638,030,000,000,000,000,000,000,000 | 12 | SERVER-44377 generate correct plan for indexed inequalities to null |
static int session_predicate_for_stream_send(nghttp2_session *session,
nghttp2_stream *stream) {
if (stream == NULL) {
return NGHTTP2_ERR_STREAM_CLOSED;
}
if (session_is_closing(session)) {
return NGHTTP2_ERR_SESSION_CLOSING;
}
if (stream->shut_flags & NGHT... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 52,625,222,127,223,440,000,000,000,000,000,000,000 | 13 | Add nghttp2_option_set_max_outbound_ack |
process_option(void)
{
char begin_char = '[', end_char = ']';
int len;
if (cur_select == NULL || cur_option == NULL)
return;
while (cur_option->length > 0 && IS_SPACE(Strlastchar(cur_option)))
Strshrink(cur_option, 1);
if (cur_option_value == NULL)
cur_option_value = cur_option;
if (cur_opti... | 0 | [
"CWE-476"
] | w3m | 59b91cd8e30c86f23476fa81ae005cabff49ebb6 | 234,650,109,280,430,000,000,000,000,000,000,000,000 | 43 | Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7 |
int snmp_version(void *context, size_t hdrlen, unsigned char tag,
const void *data, size_t datalen)
{
if (datalen != 1)
return -EINVAL;
if (*(unsigned char *)data > 1)
return -ENOTSUPP;
return 1;
} | 0 | [
"CWE-401",
"CWE-129",
"CWE-787"
] | linux | c4c07b4d6fa1f11880eab8e076d3d060ef3f55fc | 11,190,173,013,641,387,000,000,000,000,000,000,000 | 9 | netfilter: nf_nat_snmp_basic: add missing length checks in ASN.1 cbs
The generic ASN.1 decoder infrastructure doesn't guarantee that callbacks
will get as much data as they expect; callbacks have to check the `datalen`
parameter before looking at `data`. Make sure that snmp_version() and
snmp_helper() don't read/write... |
static void bnx2x_handle_mcast_eqe(struct bnx2x *bp)
{
struct bnx2x_mcast_ramrod_params rparam;
int rc;
memset(&rparam, 0, sizeof(rparam));
rparam.mcast_obj = &bp->mcast_obj;
netif_addr_lock_bh(bp->dev);
/* Clear pending state for the last command */
bp->mcast_obj.raw.clear_pending(&bp->mcast_obj.raw);
/* ... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 10,689,418,989,121,904,000,000,000,000,000,000,000 | 24 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
ZEND_METHOD(exception, __toString)
{
zval message, file, line, *trace, *exception;
char *str, *prev_str;
int len = 0;
zend_fcall_info fci;
zval fname;
DEFAULT_0_PARAMS;
str = estrndup("", 0);
exception = getThis();
ZVAL_STRINGL(&fname, "gettraceasstring", sizeof("gettraceasstring")-1, 1);
while (excepti... | 0 | [] | php-src | a894a8155fab068d68a04bf181dbaddfa01ccbb0 | 11,134,415,472,263,275,000,000,000,000,000,000,000 | 73 | More fixes for bug #69152 |
Function *ESTreeIRGen::genGeneratorFunction(
Identifier originalName,
Variable *lazyClosureAlias,
ESTree::FunctionLikeNode *functionNode) {
assert(functionNode && "Function AST cannot be null");
// Build the outer function which creates the generator.
// Does not have an associated source range.
au... | 1 | [
"CWE-125",
"CWE-787"
] | hermes | 091835377369c8fd5917d9b87acffa721ad2a168 | 306,065,218,149,504,020,000,000,000,000,000,000,000 | 43 | Correctly restore whether or not a function is an inner generator
Summary:
If a generator was large enough to be lazily compiled, we would lose
that information when reconstituting the function's context. This meant
the function was generated as a regular function instead of a generator.
#utd-hermes-ignore-android
R... |
static int aarp_seq_show(struct seq_file *seq, void *v)
{
struct aarp_iter_state *iter = seq->private;
struct aarp_entry *entry = v;
unsigned long now = jiffies;
if (v == SEQ_START_TOKEN)
seq_puts(seq,
"Address Interface Hardware Address"
" Expires LastSend Retry Status\n");
else {
seq_printf(se... | 0 | [
"CWE-476"
] | linux | 9804501fa1228048857910a6bf23e085aade37cc | 232,987,714,419,390,600,000,000,000,000,000,000,000 | 32 | appletalk: Fix potential NULL pointer dereference in unregister_snap_client
register_snap_client may return NULL, all the callers
check it, but only print a warning. This will result in
NULL pointer dereference in unregister_snap_client and other
places.
It has always been used like this since v2.6
Reported-by: Dan ... |
static const char *flat_escape_key_str(AVBPrint *dst, const char *src, const char sep)
{
const char *p;
for (p = src; *p; p++) {
if (!((*p >= '0' && *p <= '9') ||
(*p >= 'a' && *p <= 'z') ||
(*p >= 'A' && *p <= 'Z')))
av_bprint_chars(dst, '_', 1);
else
... | 0 | [
"CWE-476"
] | FFmpeg | 837cb4325b712ff1aab531bf41668933f61d75d2 | 113,465,895,941,891,570,000,000,000,000,000,000,000 | 14 | ffprobe: Fix null pointer dereference with color primaries
Found-by: AD-lab of venustech
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
int _yr_scan_icompare(
uint8_t* data,
size_t data_size,
uint8_t* string,
size_t string_length)
{
uint8_t* s1 = data;
uint8_t* s2 = string;
size_t i = 0;
if (data_size < string_length)
return 0;
while (i < string_length && yr_lowercase[*s1++] == yr_lowercase[*s2++])
i++;
return (i... | 0 | [
"CWE-125"
] | yara | 83d799804648c2a0895d40a19835d9b757c6fa4e | 143,717,092,287,312,320,000,000,000,000,000,000,000 | 19 | Fix issue #646 (#648)
* Fix issue #646 and some edge cases with wide regexps using \b and \B
* Rename function IS_WORD_CHAR to _yr_re_is_word_char |
NO_INLINE void jsExceptionHere(JsExceptionType type, const char *fmt, ...) {
// If we already had an exception, forget this
if (jspHasError()) return;
jsiConsoleRemoveInputLine();
JsVar *var = jsvNewFromEmptyString();
if (!var) {
jspSetError(false);
return; // out of memory
}
JsvStringIterator ... | 0 | [
"CWE-119",
"CWE-787"
] | Espruino | 0a7619875bf79877907205f6bee08465b89ff10b | 74,647,205,836,048,860,000,000,000,000,000,000,000 | 39 | Fix strncat/cpy bounding issues (fix #1425) |
static ssize_t wakeup_show(struct device *dev, struct device_attribute *attr,
char *buf)
{
return sprintf(buf, "%s\n", device_can_wakeup(dev)
? (device_may_wakeup(dev) ? _enabled : _disabled)
: "");
} | 1 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 6,707,966,926,275,445,000,000,000,000,000,000,000 | 7 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
auth_shadow (
/* PARAMETERS */
const char *login, /* I: plaintext authenticator */
const char *password, /* I: plaintext password */
const char *service __attribute__((unused)),
const char *realm __attribute__((unused))
/* END PARAMETERS */
)
{
/*******************************************************... | 0 | [
"CWE-189"
] | cyrus-sasl | dedad73e5e7a75d01a5f3d5a6702ab8ccd2ff40d | 157,861,716,078,990,500,000,000,000,000,000,000,000 | 217 | Handle NULL returns from glibc 2.17+ crypt()
Starting with glibc 2.17 (eglibc 2.17), crypt() fails with EINVAL
(w/ NULL return) if the salt violates specifications. Additionally,
on FIPS-140 enabled Linux systems, DES/MD5-encrypted passwords
passed to crypt() fail with EPERM (w/ NULL return).
When using glibc's crypt... |
static void copy_asoundrc(void) {
// copy XAUTHORITY_FILE in the new home directory
char *src = RUN_ASOUNDRC_FILE ;
char *dest;
if (asprintf(&dest, "%s/.asoundrc", cfg.homedir) == -1)
errExit("asprintf");
// if destination is a symbolic link, exit the sandbox!!!
if (is_link(dest)) {
fprintf(stderr, "Error: ... | 0 | [
"CWE-284",
"CWE-269"
] | firejail | 903fd8a0789ca3cc3c21d84cd0282481515592ef | 23,248,678,754,845,490,000,000,000,000,000,000,000 | 19 | security fix |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
auto* params =
reinterpret_cast<TfLiteLSHProjectionParams*>(node->builtin_data);
int32_t* out_buf = GetOutput(context, node, 0)->data.i32;
const TfLiteTensor* hash = GetInput(context, node, 0);
const TfLiteTensor* input = GetInput(context, nod... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 269,975,647,251,043,720,000,000,000,000,000,000,000 | 23 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static int snd_pcm_oss_open_file(struct file *file,
struct snd_pcm *pcm,
struct snd_pcm_oss_file **rpcm_oss_file,
int minor,
struct snd_pcm_oss_setup *setup)
{
int idx, err;
struct snd_pcm_oss_file *pcm_oss_file;
struct snd_pcm_substream *substream;
fmode_t f_mode = file->f_mode;
if (rpcm_oss_... | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 334,493,973,686,454,870,000,000,000,000,000,000,000 | 55 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
void ConnectionImpl::onMessageBeginBase() {
ENVOY_CONN_LOG(trace, "message begin", connection_);
// Make sure that if HTTP/1.0 and HTTP/1.1 requests share a connection Envoy correctly sets
// protocol for each request. Envoy defaults to 1.1 but sets the protocol to 1.0 where applicable
// in onHeadersCompleteBa... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 338,282,029,977,944,130,000,000,000,000,000,000,000 | 11 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
static int ZEND_FASTCALL ZEND_UNSET_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval **container = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
zval *offset = &opline->op2.u.constant;
if (IS_VAR != IS_VAR || container) {
if (I... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 267,095,241,723,153,220,000,000,000,000,000,000,000 | 35 | - 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 |
void ConnectionManagerImpl::ActiveStream::onResetStream(StreamResetReason reset_reason,
absl::string_view) {
// NOTE: This function gets called in all of the following cases:
// 1) We TX an app level reset
// 2) The codec TX a codec level reset
... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 184,825,183,882,606,900,000,000,000,000,000,000,000 | 35 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void get_timewait4_sock(const struct inet_timewait_sock *tw,
struct seq_file *f, int i)
{
long delta = tw->tw_timer.expires - jiffies;
__be32 dest, src;
__u16 destp, srcp;
dest = tw->tw_daddr;
src = tw->tw_rcv_saddr;
destp = ntohs(tw->tw_dport);
srcp = ntohs(tw->tw_sport);
seq_printf(f, "... | 0 | [
"CWE-284"
] | linux | ac6e780070e30e4c35bd395acfe9191e6268bdd3 | 120,396,987,888,193,640,000,000,000,000,000,000,000 | 18 | tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()
Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.
We ... |
static void test_syslog_parse_identifier(const char *str,
const char *ident, const char *pid, const char *rest, int ret) {
const char *buf = str;
_cleanup_free_ char *ident2 = NULL, *pid2 = NULL;
int ret2;
ret2 = syslog_parse_identifier(&buf, &id... | 0 | [
"CWE-125"
] | systemd | 8595102d3ddde6d25c282f965573a6de34ab4421 | 46,313,365,424,361,960,000,000,000,000,000,000,000 | 13 | journal: do not remove multiple spaces after identifier in syslog message
Single space is used as separator.
C.f. discussions in #156.
Fixes #9839 introduced by a6aadf4ae0bae185dc4c414d492a4a781c80ffe5. |
static long ioctl_dtprop(struct fsl_hv_ioctl_prop __user *p, int set)
{
struct fsl_hv_ioctl_prop param;
char __user *upath, *upropname;
void __user *upropval;
char *path, *propname;
void *propval;
int ret = 0;
/* Get the parameters from the user. */
if (copy_from_user(¶m, p, sizeof(struct fsl_hv_ioctl_prop... | 0 | [
"CWE-190"
] | linux | 6a024330650e24556b8a18cc654ad00cfecf6c6c | 207,486,470,772,098,650,000,000,000,000,000,000,000 | 77 | drivers/virt/fsl_hypervisor.c: prevent integer overflow in ioctl
The "param.count" value is a u64 thatcomes from the user. The code
later in the function assumes that param.count is at least one and if
it's not then it leads to an Oops when we dereference the ZERO_SIZE_PTR.
Also the addition can have an integer over... |
nfsd4_encode_access(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd4_access *access)
{
struct xdr_stream *xdr = &resp->xdr;
__be32 *p;
if (!nfserr) {
p = xdr_reserve_space(xdr, 8);
if (!p)
return nfserr_resource;
*p++ = cpu_to_be32(access->ac_supported);
*p++ = cpu_to_be32(access->ac_resp_acce... | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 43,329,413,711,885,600,000,000,000,000,000,000,000 | 14 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
virtual Item *derived_grouping_field_transformer_for_where(THD *thd,
uchar *arg)
{ return this; } | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 160,598,102,762,571,790,000,000,000,000,000,000,000 | 3 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
dir_s_mkdir(int argc, VALUE *argv, VALUE obj)
{
struct mkdir_arg m;
VALUE path, vmode;
int r;
if (rb_scan_args(argc, argv, "11", &path, &vmode) == 2) {
m.mode = NUM2MODET(vmode);
}
else {
m.mode = 0777;
}
path = check_dirname(path);
m.path = RSTRING_PTR(path);
r = (int)(VALUE... | 0 | [
"CWE-22"
] | ruby | bd5661a3cbb38a8c3a3ea10cd76c88bbef7871b8 | 81,783,302,661,734,080,000,000,000,000,000,000,000 | 21 | dir.c: check NUL bytes
* dir.c (GlobPathValue): should be used in rb_push_glob only.
other methods should use FilePathValue.
https://hackerone.com/reports/302338
* dir.c (rb_push_glob): expand GlobPathValue
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62989 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
ResponseTrailerMapOptRef ActiveStreamDecoderFilter::responseTrailers() const {
return parent_.filter_manager_callbacks_.responseTrailers();
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 229,987,847,822,513,150,000,000,000,000,000,000,000 | 3 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static inline void put_inotify_watch(struct inotify_watch *watch)
{
} | 0 | [
"CWE-362"
] | linux-2.6 | 8f7b0ba1c853919b85b54774775f567f30006107 | 215,332,688,192,270,670,000,000,000,000,000,000,000 | 3 | Fix inotify watch removal/umount races
Inotify watch removals suck violently.
To kick the watch out we need (in this order) inode->inotify_mutex and
ih->mutex. That's fine if we have a hold on inode; however, for all
other cases we need to make damn sure we don't race with umount. We can
*NOT* just grab a reference... |
int not_unsigned(const char *str) {
int rv = 0;
const char *ptr = str;
while (*ptr != ' ' && *ptr != '\t' && *ptr != '\0') {
if (!isdigit(*ptr)) {
rv = 1;
break;
}
ptr++;
}
return rv;
} | 0 | [
"CWE-284",
"CWE-269"
] | firejail | 903fd8a0789ca3cc3c21d84cd0282481515592ef | 68,351,259,101,676,510,000,000,000,000,000,000,000 | 13 | security fix |
static int detect_netkey(
sc_pkcs15_card_t *p15card
){
sc_card_t *card=p15card->card;
sc_path_t p;
sc_file_t *f;
int keylen;
char dir[10];
const char *c_auth;
/* NKS-Applikation ? */
memset(&p, 0, sizeof(sc_path_t));
p.type=SC_PATH_TYPE_DF_NAME;
memcpy(p.value, "\xD2\x76\x00\x00\x03\x01\x02", p.len=7);
if ... | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 224,236,581,833,829,440,000,000,000,000,000,000,000 | 93 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
set_field_to_set_field(const struct ofpact_set_field *sf,
enum ofp_version ofp_version, struct ofpbuf *out)
{
struct ofp12_action_set_field *oasf OVS_UNUSED;
size_t start_ofs = out->size;
oasf = put_OFPAT12_SET_FIELD(out);
out->size = out->size - sizeof oasf->pad;
nx_put_entr... | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 140,979,891,001,940,430,000,000,000,000,000,000,000 | 12 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
intrusive_ptr<Expression> ExpressionDateFromParts::optimize() {
if (_year) {
_year = _year->optimize();
}
if (_month) {
_month = _month->optimize();
}
if (_day) {
_day = _day->optimize();
}
if (_hour) {
_hour = _hour->optimize();
}
if (_minute) {
... | 0 | [
"CWE-835"
] | mongo | 0a076417d1d7fba3632b73349a1fd29a83e68816 | 184,821,508,951,318,960,000,000,000,000,000,000,000 | 52 | SERVER-38070 fix infinite loop in agg expression |
hook_command (struct t_weechat_plugin *plugin, const char *command,
const char *description,
const char *args, const char *args_description,
const char *completion,
t_hook_callback_command *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 2,771,912,146,891,617,700,000,000,000,000,000,000 | 63 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
void Filter::disableIdleTimer() {
if (idle_timer_ != nullptr) {
idle_timer_->disableTimer();
idle_timer_.reset();
}
} | 0 | [
"CWE-416"
] | envoy | ce0ae309057a216aba031aff81c445c90c6ef145 | 313,404,036,763,532,220,000,000,000,000,000,000,000 | 6 | CVE-2021-43826
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static inline void end_dir_add(struct inode *dir, unsigned n)
{
smp_store_release(&dir->i_dir_seq, n + 2);
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 92,733,465,817,626,150,000,000,000,000,000,000,000 | 4 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
const TfLiteTensor* input;
TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input));
TfLiteTensor* output;
TF_LITE_ENSURE_OK(context,
GetOutputSafe(context, node, kOutputTensor, &output));
const int num_elem... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 152,327,649,042,944,180,000,000,000,000,000,000,000 | 30 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static size_t QuantizeErrorFlatten(const CubeInfo *cube_info,
const NodeInfo *node_info,const ssize_t offset,double *quantize_error)
{
register ssize_t
i;
size_t
n,
number_children;
if (offset >= (ssize_t) cube_info->nodes)
return(0);
quantize_error[offset]=node_info->quantize_error;
n=1;
... | 0 | [
"CWE-125"
] | ImageMagick | 5294966898532a6bd54699fbf04edf18902513ac | 318,752,208,234,082,420,000,000,000,000,000,000,000 | 21 | https://github.com/ImageMagick/ImageMagick/issues/1156 |
static void i40e_reset_and_rebuild(struct i40e_pf *pf, bool reinit,
bool lock_acquired)
{
int ret;
/* Now we wait for GRST to settle out.
* We don't have to delete the VEBs or VSIs from the hw switch
* because the reset will make them disappear.
*/
ret = i40e_reset(pf);
if (!ret)
i40e_rebuild(pf, rei... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 271,981,500,991,362,900,000,000,000,000,000,000,000 | 12 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
void Assign(const D& d, Out out, Rhs rhs) {
out.device(d) = rhs;
} | 0 | [
"CWE-476",
"CWE-787"
] | tensorflow | 93f428fd1768df147171ed674fee1fc5ab8309ec | 49,932,410,246,407,800,000,000,000,000,000,000,000 | 3 | Fix nullptr deref and heap OOB access in binary cwise ops.
PiperOrigin-RevId: 387936777
Change-Id: I608b8074cec36a982cca622b7144cb2c43e6e19f |
void trace_buffer_unlock_commit_regs(struct trace_array *tr,
struct ring_buffer *buffer,
struct ring_buffer_event *event,
unsigned long flags, int pc,
struct pt_regs *regs)
{
__buffer_unlock_commit(buffer, event);
/*
* If regs is not set, then skip the following callers:
* t... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 286,052,656,294,965,240,000,000,000,000,000,000,000 | 21 | 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... |
PHP_FUNCTION(openssl_pkey_free)
{
zval *key;
EVP_PKEY *pkey;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &key) == FAILURE) {
return;
}
ZEND_FETCH_RESOURCE(pkey, EVP_PKEY *, &key, -1, "OpenSSL key", le_key);
zend_list_delete(Z_LVAL_P(key));
} | 0 | [
"CWE-200"
] | php-src | 270a406ac94b5fc5cc9ef59fc61e3b4b95648a3e | 50,165,438,049,544,890,000,000,000,000,000,000,000 | 11 | Fix bug #61413 ext\openssl\tests\openssl_encrypt_crash.phpt fails 5.3 only |
cache_add_entry(struct iso9660 *iso9660, struct file_info *file)
{
file->next = NULL;
*iso9660->cache_files.last = file;
iso9660->cache_files.last = &(file->next);
} | 0 | [
"CWE-125"
] | libarchive | f9569c086ff29259c73790db9cbf39fe8fb9d862 | 67,009,466,294,043,430,000,000,000,000,000,000,000 | 6 | iso9660: validate directory record length |
void avahi_server_set_data(AvahiServer *s, void* userdata) {
assert(s);
s->userdata = userdata;
} | 0 | [
"CWE-399"
] | avahi | 3093047f1aa36bed8a37fa79004bf0ee287929f4 | 211,132,026,326,465,560,000,000,000,000,000,000,000 | 5 | Don't get confused by UDP packets with a source port that is zero
This is a fix for rhbz 475394.
Problem identified by Hugo Dias. |
void gdImageSaveAlpha (gdImagePtr im, int saveAlphaArg)
{
im->saveAlphaFlag = saveAlphaArg;
} | 0 | [
"CWE-119"
] | php-src | e7f2356665c2569191a946b6fc35b437f0ae1384 | 8,691,106,071,209,390,000,000,000,000,000,000,000 | 4 | Fix #66387: Stack overflow with imagefilltoborder
The stack overflow is caused by the recursive algorithm in combination with a
very large negative coordinate passed to gdImageFillToBorder(). As there is
already a clipping for large positive coordinates to the width and height of
the image, it seems to be consequent t... |
SPL_METHOD(SplFileInfo, openFile)
{
spl_filesystem_object *intern = Z_SPLFILESYSTEM_P(getThis());
spl_filesystem_object_create_type(ZEND_NUM_ARGS(), intern, SPL_FS_FILE, NULL, return_value);
} | 0 | [
"CWE-74"
] | php-src | a5a15965da23c8e97657278fc8dfbf1dfb20c016 | 331,939,917,854,029,730,000,000,000,000,000,000,000 | 6 | Fix #78863: DirectoryIterator class silently truncates after a null byte
Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings. |
static int http_open(URLContext *h, const char *uri, int flags,
AVDictionary **options)
{
HTTPContext *s = h->priv_data;
int ret;
if( s->seekable == 1 )
h->is_streamed = 0;
else
h->is_streamed = 1;
s->filesize = UINT64_MAX;
s->location = av_strdup(uri);
... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 2a05c8f813de6f2278827734bf8102291e7484aa | 58,223,036,445,703,990,000,000,000,000,000,000,000 | 40 | http: make length/offset-related variables unsigned.
Fixes #5992, reported and found by Paul Cher <paulcher@icloud.com>. |
long strncpy_from_user(char *dst, const char __user *src, long count)
{
unsigned long max_addr, src_addr;
if (unlikely(count <= 0))
return 0;
max_addr = user_addr_max();
src_addr = (unsigned long)src;
if (likely(src_addr < max_addr)) {
unsigned long max = max_addr - src_addr;
long retval;
kasan_check_wr... | 1 | [
"CWE-20"
] | linux | 594cc251fdd0d231d342d88b2fdff4bc42fb0690 | 86,401,450,376,607,640,000,000,000,000,000,000,000 | 22 | make 'user_access_begin()' do 'access_ok()'
Originally, the rule used to be that you'd have to do access_ok()
separately, and then user_access_begin() before actually doing the
direct (optimized) user access.
But experience has shown that people then decide not to do access_ok()
at all, and instead rely on it being i... |
_libssh2_channel_receive_window_adjust(LIBSSH2_CHANNEL * channel,
uint32_t adjustment,
unsigned char force,
unsigned int *store)
{
int rc;
if(store)
*store = channel->remote.window_size;... | 0 | [
"CWE-787"
] | libssh2 | dc109a7f518757741590bb993c0c8412928ccec2 | 151,774,891,965,444,470,000,000,000,000,000,000,000 | 62 | Security fixes (#315)
* Bounds checks
Fixes for CVEs
https://www.libssh2.org/CVE-2019-3863.html
https://www.libssh2.org/CVE-2019-3856.html
* Packet length bounds check
CVE
https://www.libssh2.org/CVE-2019-3855.html
* Response length check
CVE
https://www.libssh2.org/CVE-2019-3859.html
* Bounds ch... |
mem_pre_alloc_s(size_t *sizep)
{
*sizep += sizeof(size_t);
} | 0 | [
"CWE-416"
] | vim | 9f1a39a5d1cd7989ada2d1cb32f97d84360e050f | 35,727,621,685,651,640,000,000,000,000,000,000,000 | 4 | patch 8.2.4040: keeping track of allocated lines is too complicated
Problem: Keeping track of allocated lines in user functions is too
complicated.
Solution: Instead of freeing individual lines keep them all until the end. |
static void php_var_serialize_intern(smart_str *buf, zval *struc, php_serialize_data_t var_hash) /* {{{ */
{
zend_long var_already;
HashTable *myht;
if (EG(exception)) {
return;
}
if (var_hash && (var_already = php_add_var_hash(var_hash, struc))) {
if (Z_ISREF_P(struc)) {
smart_str_appendl(buf, "R:", 2);
... | 0 | [
"CWE-416"
] | php-src | b2af4e8868726a040234de113436c6e4f6372d17 | 101,293,803,595,600,260,000,000,000,000,000,000,000 | 187 | Complete the fix of bug #70172 for PHP 7 |
static Vector_3 convert(const CGAL::Vector_3<R>& v){return v.exact();} | 0 | [
"CWE-125"
] | cgal | 5a1ab45058112f8647c14c02f58905ecc597ec76 | 268,286,852,563,284,200,000,000,000,000,000,000,000 | 1 | Fix Nef_3 |
size_t __ksize(const void *object)
{
struct page *page;
if (unlikely(object == ZERO_SIZE_PTR))
return 0;
page = virt_to_head_page(object);
if (unlikely(!PageSlab(page))) {
WARN_ON(!PageCompound(page));
return page_size(page);
}
return slab_ksize(page->slab_cache);
} | 0 | [] | linux | fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8 | 249,544,800,179,634,500,000,000,000,000,000,000,000 | 16 | mm: slub: add missing TID bump in kmem_cache_alloc_bulk()
When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu
freelist of length M, and N > M > 0, it will first remove the M elements
from the percpu freelist, then call ___slab_alloc() to allocate the next
element and repopulate the percpu freelis... |
compile_dict(char_u **arg, cctx_T *cctx, ppconst_T *ppconst)
{
garray_T *instr = &cctx->ctx_instr;
int count = 0;
dict_T *d = dict_alloc();
dictitem_T *item;
char_u *whitep = *arg + 1;
char_u *p;
int is_const;
int is_all_const = TRUE; // reset when non-const encountered
if (d == ... | 0 | [
"CWE-200",
"CWE-122"
] | vim | 5f25c3855071bd7e26255c68bf458b1b5cf92f39 | 295,865,543,538,577,630,000,000,000,000,000,000,000 | 163 | patch 8.2.4049: Vim9: reading before the start of the line with "$"
Problem: Vim9: reading before the start of the line with "$" by itself.
Solution: Do not subtract one when reporting the error. |
explicit ResourceScatterUpdateOp(OpKernelConstruction* c) : OpKernel(c) {
// We use the same kernel for many operations.
// Each operation has a different set of attributes defined in its nodes.
Status s = c->GetAttr("use_locking", &use_exclusive_lock_);
if (!s.ok()) {
use_exclusive_lock_ = fals... | 0 | [
"CWE-369"
] | tensorflow | ac117ee8a8ea57b73d34665cdf00ef3303bc0b11 | 268,118,878,755,987,330,000,000,000,000,000,000,000 | 8 | Prevent division by 0 in `resource_variable_ops.cc`
PiperOrigin-RevId: 387939939
Change-Id: Ib04902d63756633999959a70613f2eaa30c2c151 |
on_reauthentication_client_connected (GdmSession *session,
GCredentials *credentials,
GPid pid_of_client,
ReauthenticationRequest *request)
{
g_debug ("Gd... | 0 | [
"CWE-362"
] | gdm | dcdbaaa04012541ad2813cf83559d91d52f208b9 | 334,258,526,852,217,370,000,000,000,000,000,000,000 | 7 | session-worker: Don't switch back VTs until session is fully exited
There's a race condition on shutdown where the session worker is
switching VTs back to the initial VT at the same time as the session
exit is being processed.
This means that manager may try to start a login screen (because of
the VT switch) when aut... |
_archive_write_data(struct archive *_a, const void *buff, size_t s)
{
struct archive_write *a = (struct archive_write *)_a;
archive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,
ARCHIVE_STATE_DATA, "archive_write_data");
archive_clear_error(&a->archive);
return ((a->format_write_data)(a, buff, s));
} | 1 | [
"CWE-703",
"CWE-189"
] | libarchive | 22531545514043e04633e1c015c7540b9de9dbe4 | 2,740,075,974,428,122,000,000,000,000,000,000,000 | 8 | Limit write requests to at most INT_MAX.
This prevents a certain common programming error (passing -1 to write)
from leading to other problems deeper in the library. |
static int prb_calc_retire_blk_tmo(struct packet_sock *po,
int blk_size_in_bytes)
{
struct net_device *dev;
unsigned int mbits = 0, msec = 0, div = 0, tmo = 0;
struct ethtool_cmd ecmd;
int err;
u32 speed;
rtnl_lock();
dev = __dev_get_by_index(sock_net(&po->sk), po->ifindex);
if (unlikely(!dev)) {
rtnl_un... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 85,637,315,196,812,170,000,000,000,000,000,000,000 | 42 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
void ssl_set_client_disabled(SSL *s)
{
CERT *c = s->cert;
c->mask_a = 0;
c->mask_k = 0;
/* Don't allow TLS 1.2 only ciphers if we don't suppport them */
if (!SSL_CLIENT_USE_TLS1_2_CIPHERS(s))
c->mask_ssl = SSL_TLSV1_2;
else
c->mask_ssl = 0;
ssl_set_sig_mask(&c->mask_a, s, SSL_SECOP_SIGALG_MASK);
/* Disable... | 1 | [] | openssl | 80bd7b41b30af6ee96f519e629463583318de3b0 | 37,223,482,499,574,416,000,000,000,000,000,000,000 | 37 | Fix SRP ciphersuite DoS vulnerability.
If a client attempted to use an SRP ciphersuite and it had not been
set up correctly it would crash with a null pointer read. A malicious
server could exploit this in a DoS attack.
Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon
for reporting this issue.
CVE-201... |
std::pair<INDICES_TYPE, INDICES_TYPE> GetStrides(
const TensorShape& input_shape, const TensorShape& segment_id_shape) {
int64_t small_stride = 1;
int64_t big_stride = 1;
for (auto i = 0; i < input_shape.dims(); i++) {
if (i < segment_id_shape.dims()) {
small_stride *= segment_id_shape.dim_size(i);
... | 0 | [
"CWE-20",
"CWE-703"
] | tensorflow | 20cb18724b0bf6c09071a3f53434c4eec53cc147 | 288,406,367,359,831,980,000,000,000,000,000,000,000 | 13 | Allow 0 for number of segments in `unsorted_segment_join_op.cc`
Related to the fix for #55305
PiperOrigin-RevId: 443157549 |
krb5_decode(void *app_data, void *buf, int len,
int level UNUSED_PARAM,
struct connectdata *conn UNUSED_PARAM)
{
gss_ctx_id_t *context = app_data;
OM_uint32 maj, min;
gss_buffer_desc enc, dec;
(void)level;
(void)conn;
enc.value = buf;
enc.length = len;
maj = gss_unwrap(&min, *c... | 1 | [] | curl | 6ecdf5136b52af747e7bda08db9a748256b1cd09 | 225,834,737,813,427,440,000,000,000,000,000,000,000 | 26 | krb5: return error properly on decode errors
Bug: https://curl.se/docs/CVE-2022-32208.html
CVE-2022-32208
Reported-by: Harry Sintonen
Closes #9051 |
rl_get_keymap ()
{
return (_rl_keymap);
} | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 323,455,881,087,612,400,000,000,000,000,000,000,000 | 4 | bash-4.4-rc2 release |
generateClonedExtStatsStmt(RangeVar *heapRel, Oid heapRelid,
Oid source_statsid)
{
HeapTuple ht_stats;
Form_pg_statistic_ext statsrec;
CreateStatsStmt *stats;
List *stat_types = NIL;
List *def_names = NIL;
bool isnull;
Datum datum;
ArrayType *arr;
char *enabled;
int i;
Assert(OidIsVal... | 0 | [
"CWE-94"
] | postgres | b9b21acc766db54d8c337d508d0fe2f5bf2daab0 | 140,904,323,547,287,030,000,000,000,000,000,000,000 | 111 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
static void vma_commit_reservation(struct hstate *h,
struct vm_area_struct *vma, unsigned long addr)
{
struct address_space *mapping = vma->vm_file->f_mapping;
struct inode *inode = mapping->host;
if (vma->vm_flags & VM_MAYSHARE) {
pgoff_t idx = vma_hugecache_offset(h, vma, addr);
region_add(&inode->i_mappin... | 0 | [
"CWE-399"
] | linux | 90481622d75715bfcb68501280a917dbfe516029 | 131,465,773,435,761,370,000,000,000,000,000,000,000 | 18 | hugepages: fix use after free bug in "quota" handling
hugetlbfs_{get,put}_quota() are badly named. They don't interact with the
general quota handling code, and they don't much resemble its behaviour.
Rather than being about maintaining limits on on-disk block usage by
particular users, they are instead about maintai... |
bool get_date(THD *thd, MYSQL_TIME *to, date_mode_t mode)
{
return decimal_to_datetime_with_warn(thd, VDec(this).ptr(), to, mode,
NULL, NULL);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 244,883,269,747,253,500,000,000,000,000,000,000,000 | 5 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static void codestring (expdesc *e, TString *s) {
e->f = e->t = NO_JUMP;
e->k = VKSTR;
e->u.strval = s;
} | 0 | [
"CWE-125"
] | lua | 1f3c6f4534c6411313361697d98d1145a1f030fa | 77,188,750,665,714,400,000,000,000,000,000,000,000 | 5 | Bug: Lua can generate wrong code when _ENV is <const> |
static int audit_do_config_change(char *function_name, u32 *to_change, u32 new)
{
int allow_changes, rc = 0;
u32 old = *to_change;
/* check if we are locked */
if (audit_enabled == AUDIT_LOCKED)
allow_changes = 0;
else
allow_changes = 1;
if (audit_enabled != AUDIT_OFF) {
rc = audit_log_config_change(funct... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 278,660,850,162,579,100,000,000,000,000,000,000,000 | 25 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
__releases(rq->lock)
{
raw_spin_unlock_irqrestore(&rq->lock, *flags);
} | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 125,266,837,723,738,280,000,000,000,000,000,000,000 | 4 | 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... |
char *FLTGetLogicalComparisonExpresssion(FilterEncodingNode *psFilterNode, layerObj *lp)
{
char *pszTmp = NULL;
char *pszBuffer = NULL;
int nTmp = 0;
if (!psFilterNode || !FLTIsLogicalFilterType(psFilterNode->pszValue))
return NULL;
/* ===================================================================... | 0 | [
"CWE-200",
"CWE-119"
] | mapserver | e52a436c0e1c5e9f7ef13428dba83194a800f4df | 292,460,374,360,020,200,000,000,000,000,000,000,000 | 105 | security fix (patch by EvenR) |
cgraph_edge_brings_value_p (cgraph_edge *cs, ipcp_value_source<tree> *src,
cgraph_node *dest, ipcp_value<tree> *dest_val)
{
class ipa_node_params *caller_info = IPA_NODE_REF (cs->caller);
enum availability availability;
cgraph_node *real_dest = cs->callee->function_symbol (&availability);
if (availabili... | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 92,059,453,346,547,590,000,000,000,000,000,000,000 | 53 | 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 vhost_scsi_done_inflight(struct kref *kref)
{
struct vhost_scsi_inflight *inflight;
inflight = container_of(kref, struct vhost_scsi_inflight, kref);
complete(&inflight->comp);
} | 0 | [
"CWE-200",
"CWE-119"
] | linux | 59c816c1f24df0204e01851431d3bab3eb76719c | 78,822,304,590,085,130,000,000,000,000,000,000,000 | 7 | vhost/scsi: potential memory corruption
This code in vhost_scsi_make_tpg() is confusing because we limit "tpgt"
to UINT_MAX but the data type of "tpg->tport_tpgt" and that is a u16.
I looked at the context and it turns out that in
vhost_scsi_set_endpoint(), "tpg->tport_tpgt" is used as an offset into
the vs_tpg[] arr... |
static __poll_t ringbuf_map_poll(struct bpf_map *map, struct file *filp,
struct poll_table_struct *pts)
{
struct bpf_ringbuf_map *rb_map;
rb_map = container_of(map, struct bpf_ringbuf_map, map);
poll_wait(filp, &rb_map->rb->waitq, pts);
if (ringbuf_avail_data_sz(rb_map->rb))
return EPOLLIN | EPOLLRDNORM;
... | 0 | [
"CWE-787"
] | bpf | 4b81ccebaeee885ab1aa1438133f2991e3a2b6ea | 329,197,326,170,600,500,000,000,000,000,000,000,000 | 12 | bpf, ringbuf: Deny reserve of buffers larger than ringbuf
A BPF program might try to reserve a buffer larger than the ringbuf size.
If the consumer pointer is way ahead of the producer, that would be
successfully reserved, allowing the BPF program to read or write out of
the ringbuf allocated area.
Reported-by: Ryota... |
static int dn_fib_check_nh(const struct rtmsg *r, struct dn_fib_info *fi, struct dn_fib_nh *nh)
{
int err;
if (nh->nh_gw) {
struct flowidn fld;
struct dn_fib_res res;
if (nh->nh_flags&RTNH_F_ONLINK) {
struct net_device *dev;
if (r->rtm_scope >= RT_SCOPE_LINK)
return -EINVAL;
if (dnet_addr_type(n... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 274,251,865,120,135,340,000,000,000,000,000,000,000 | 70 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static int channel_send_eof(lua_State *L, int status, lua_KContext ctx) {
int rc;
// ssh_userdata *state = (ssh_userdata *)lua_touserdata(L, 1);
LIBSSH2_CHANNEL **channel = (LIBSSH2_CHANNEL **) lua_touserdata(L, 2);
while ((rc = libssh2_channel_send_eof(*channel)) == LIBSSH2_ERROR_EAGAIN) {
lua... | 0 | [
"CWE-415"
] | nmap | 350bbe0597d37ad67abe5fef8fba984707b4e9ad | 236,646,847,732,427,680,000,000,000,000,000,000,000 | 15 | Avoid a crash (double-free) when SSH connection fails |
static int protocol_client_msg(VncState *vs, uint8_t *data, size_t len)
{
int i;
uint16_t limit;
VncDisplay *vd = vs->vd;
if (data[0] > 3) {
update_displaychangelistener(&vd->dcl, VNC_REFRESH_INTERVAL_BASE);
}
switch (data[0]) {
case VNC_MSG_CLIENT_SET_PIXEL_FORMAT:
if (len... | 0 | [
"CWE-125"
] | qemu | bea60dd7679364493a0d7f5b54316c767cf894ef | 320,689,175,401,966,670,000,000,000,000,000,000,000 | 147 | 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... |
}
/* put_params is supposed to check all the parameters before setting any. */
static int
lxm_put_params(gx_device *pdev, gs_param_list *plist)
{
int ecode;
lxm_device* const ldev = (lxm_device*)pdev;
int trialHeadSeparation=ldev->headSeparation;
int code = param_read_int(plist, "HeadSeparation", &tria... | 0 | [
"CWE-787"
] | ghostpdl | a6f7464dddc689386668a38b92dfd03cc1b38a10 | 171,477,704,074,290,000,000,000,000,000,000,000,000 | 19 | Bug 701827: fixed incorrect buffer expansion in lxm5700m_print_page().
Fixes:
./sanbin/gs -dBATCH -dNOPAUSE -r425 -dFitPage -sOutputFile=tmp -sDEVICE=lxm5700m ../bug-701827.eps |
MagickExport MagickBooleanType AnnotateComponentGenesis(void)
{
if (annotate_semaphore == (SemaphoreInfo *) NULL)
annotate_semaphore=AllocateSemaphoreInfo();
return(MagickTrue);
} | 0 | [
"CWE-125"
] | ImageMagick6 | f6ffc702c6eecd963587273a429dcd608c648984 | 141,266,754,980,636,370,000,000,000,000,000,000,000 | 6 | https://github.com/ImageMagick/ImageMagick/issues/1588 |
guestfs___check_package_format (guestfs_h *g, struct inspect_fs *fs)
{
switch (fs->distro) {
case OS_DISTRO_FEDORA:
case OS_DISTRO_MEEGO:
case OS_DISTRO_REDHAT_BASED:
case OS_DISTRO_RHEL:
case OS_DISTRO_MAGEIA:
case OS_DISTRO_MANDRIVA:
case OS_DISTRO_SUSE_BASED:
case OS_DISTRO_OPENSUSE:
case OS_DIST... | 0 | [
"CWE-703"
] | libguestfs | fa6a76050d82894365dfe32916903ef7fee3ffcd | 335,117,379,103,525,450,000,000,000,000,000,000,000 | 45 | inspection: Fix double-free when certain guest files are empty.
The following commit:
commit 5a3da366268825b26b470cde35658b67c1d11cd4
Author: Richard W.M. Jones <rjones@redhat.com>
Date: Thu Jan 24 17:07:38 2013 +0000
inspect: Use CLEANUP_* macros in inspection code.
can cause a double-free along an e... |
R_API int r_core_anal_esil_fcn(RCore *core, ut64 at, ut64 from, int reftype, int depth) {
const char *esil;
eprintf ("TODO\n");
while (1) {
// TODO: Implement the proper logic for doing esil analysis
RAnalOp *op = r_core_anal_op (core, at, R_ANAL_OP_MASK_ESIL);
if (!op) {
break;
}
esil = R_STRBUF_SAFEGE... | 0 | [
"CWE-416"
] | radare2 | 10517e3ff0e609697eb8cde60ec8dc999ee5ea24 | 226,227,640,089,191,300,000,000,000,000,000,000,000 | 20 | aaef on arm/thumb switches causes uaf ##crash
* Reported by peacock-doris via huntr.dev
* Reproducer: poc_uaf_r_reg_get |
static u32 perf_event_pid(struct perf_event *event, struct task_struct *p)
{
return perf_event_pid_type(event, p, PIDTYPE_TGID);
} | 0 | [
"CWE-401"
] | tip | 7bdb157cdebbf95a1cd94ed2e01b338714075d00 | 237,414,280,540,635,450,000,000,000,000,000,000,000 | 4 | perf/core: Fix a memory leak in perf_event_parse_addr_filter()
As shown through runtime testing, the "filename" allocation is not
always freed in perf_event_parse_addr_filter().
There are three possible ways that this could happen:
- It could be allocated twice on subsequent iterations through the loop,
- or leake... |
char* x509_proxy_email( globus_gsi_cred_handle_t handle )
{
X509_NAME *email_orig = NULL;
STACK_OF(X509) *cert_chain = NULL;
GENERAL_NAME *gen;
GENERAL_NAMES *gens;
X509 *cert = NULL;
char *email = NULL, *email2 = NULL;
int i, j;
if ( activate_globus_gsi() != 0 ) {
return NULL;
}
if ((*globu... | 0 | [
"CWE-20"
] | htcondor | 2f3c393feb819cf6c6d06fb0a2e9c4e171f3c26d | 33,163,098,410,649,395,000,000,000,000,000,000,000 | 75 | (#6455) Fix issue validating VOMS proxies |
static struct sk_buff *receive_mergeable(struct net_device *dev,
struct virtnet_info *vi,
struct receive_queue *rq,
unsigned long ctx,
unsigned int len)
{
void *buf = mergeable_ctx_to_buf_address(ctx);
struct virtio_net_hdr_mrg_rxbuf *hdr = buf;
u16 num_buf = virtio16_to_cpu(vi->vdev, hdr->nu... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 48900cb6af4282fa0fb6ff4d72a81aa3dadb5c39 | 185,936,283,803,774,260,000,000,000,000,000,000,000 | 87 | virtio-net: drop NETIF_F_FRAGLIST
virtio declares support for NETIF_F_FRAGLIST, but assumes
that there are at most MAX_SKB_FRAGS + 2 fragments which isn't
always true with a fraglist.
A longer fraglist in the skb will make the call to skb_to_sgvec overflow
the sg array, leading to memory corruption.
Drop NETIF_F_FRA... |
utf_off2cells(unsigned off, unsigned max_off)
{
return (off + 1 < max_off && ScreenLines[off + 1] == 0) ? 2 : 1;
} | 0 | [
"CWE-122",
"CWE-787"
] | vim | f6d39c31d2177549a986d170e192d8351bd571e2 | 44,873,933,225,677,550,000,000,000,000,000,000,000 | 4 | patch 9.0.0220: invalid memory access with for loop over NULL string
Problem: Invalid memory access with for loop over NULL string.
Solution: Make sure mb_ptr2len() consistently returns zero for NUL. |
merge_selfsigs_main (KBNODE keyblock, int *r_revoked,
struct revoke_info *rinfo)
{
PKT_public_key *pk = NULL;
KBNODE k;
u32 kid[2];
u32 sigdate, uiddate, uiddate2;
KBNODE signode, uidnode, uidnode2;
u32 curtime = make_timestamp ();
unsigned int key_usage = 0;
u32 keytimestamp = 0;
u32 key_expir... | 0 | [
"CWE-310"
] | gnupg | 4bde12206c5bf199dc6e12a74af8da4558ba41bf | 233,065,072,053,737,850,000,000,000,000,000,000,000 | 484 | gpg: Distinguish between missing and cleared key flags.
* include/cipher.h (PUBKEY_USAGE_NONE): New.
* g10/getkey.c (parse_key_usage): Set new flag.
--
We do not want to use the default capabilities (derived from the
algorithm) if any key flags are given in a signature. Thus if key
flags are used in any way, the def... |
gs_heap_alloc_struct(gs_memory_t * mem, gs_memory_type_ptr_t pstype,
client_name_t cname)
{
void *ptr =
gs_heap_alloc_bytes(mem, gs_struct_type_size(pstype), cname);
if (ptr == 0)
return 0;
((gs_malloc_block_t *) ptr)[-1].type = pstype;
return ptr;
} | 0 | [] | ghostpdl | 0c0b0859ae1aba64861599f0e7f74f143f305932 | 142,309,569,893,542,220,000,000,000,000,000,000,000 | 11 | Bug 696041: sanity check for memory allocation.
In gs_heap_alloc_bytes(), add a sanity check to ensure we don't overflow the
variable holding the actual number of bytes we allocate.
No cluster differences |
char *hex_to_string(const unsigned char *buffer, long len)
{
char *tmp, *q;
const unsigned char *p;
int i;
const static char hexdig[] = "0123456789ABCDEF";
if(!buffer || !len) return NULL;
if(!(tmp = OPENSSL_malloc(len * 3 + 1))) {
X509V3err(X509V3_F_HEX_TO_STRING,ERR_R_MALLOC_FAILURE);
return NULL;
}
q = t... | 0 | [] | openssl | a70da5b3ecc3160368529677006801c58cb369db | 205,824,823,347,908,070,000,000,000,000,000,000,000 | 24 | New functions to check a hostname email or IP address against a
certificate. Add options to s_client, s_server and x509 utilities
to print results of checks. |
static MagickBooleanType WriteXPMImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
#define MaxCixels 92
static const char
Cixel[MaxCixels+1] = " .XoO+@#$%&*=-;:>,<1234567890qwertyuipasdfghjk"
"lzxcvbnmMNBVCZASDFGHJKLPIUYTREWQ!~^/()_`'][{}|";
char
buffe... | 0 | [
"CWE-772"
] | ImageMagick | 7b97357e7f8d6ae848a4c699fe17db6fcf4bd7a9 | 255,223,299,907,960,670,000,000,000,000,000,000,000 | 207 | https://github.com/ImageMagick/ImageMagick/issues/873 |
mysql_real_connect(MYSQL *mysql, const char *host, const char *user,
const char *passwd, const char *db,
uint port, const char *unix_socket,unsigned long client_flag)
{
char *end= NULL;
char *connection_handler= (mysql->options.extension) ?
mysql->options.extension->connection_... | 0 | [] | mariadb-connector-c | 27b2f3d1f1550dfaee0f63a331a406ab31c1b37e | 96,242,566,631,704,440,000,000,000,000,000,000,000 | 55 | various checks for corrupted packets in the protocol
also: check the return value of unpack_fields() |
jas_image_t *jp2_decode(jas_stream_t *in, char *optstr)
{
jp2_box_t *box;
int found;
jas_image_t *image;
jp2_dec_t *dec;
bool samedtype;
int dtype;
unsigned int i;
jp2_cmap_t *cmapd;
jp2_pclr_t *pclrd;
jp2_cdef_t *cdefd;
unsigned int channo;
int newcmptno;
int_fast32_t *lutents;
#if 0
jp2_cdefchan_t *cdef... | 0 | [
"CWE-20",
"CWE-190"
] | jasper | d42b2388f7f8e0332c846675133acea151fc557a | 32,071,854,123,589,120,000,000,000,000,000,000,000 | 356 | The generation of the configuration file jas_config.h has been completely
reworked in order to avoid pollution of the global namespace.
Some problematic types like uchar, ulong, and friends have been replaced
with names with a jas_ prefix.
An option max_samples has been added to the BMP and JPEG decoders to
restrict ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.