prompt
stringclasses 1
value | completions
listlengths 1
431
| labels
listlengths 1
431
| source
stringclasses 1
value | other_info
dict | index
int64 5
33k
|
|---|---|---|---|---|---|
Determine whether the code is vulnerable or not.
|
[
"static int crypto_ctr_crypt_segment(struct blkcipher_walk *walk,\n\t\t\t\t struct crypto_cipher *tfm)\n{\n\tvoid (*fn)(struct crypto_tfm *, u8 *, const u8 *) =\n\t\t crypto_cipher_alg(tfm)->cia_encrypt;\n\tunsigned int bsize = crypto_cipher_blocksize(tfm);\n\tu8 *ctrblk = walk->iv;\n\tu8 *src = walk->src.virt.addr;\n\tu8 *dst = walk->dst.virt.addr;\n\tunsigned int nbytes = walk->nbytes;",
"\tdo {\n\t\t/* create keystream */\n\t\tfn(crypto_cipher_tfm(tfm), dst, ctrblk);\n\t\tcrypto_xor(dst, src, bsize);",
"\t\t/* increment counter in counterblock */\n\t\tcrypto_inc(ctrblk, bsize);",
"\t\tsrc += bsize;\n\t\tdst += bsize;\n\t} while ((nbytes -= bsize) >= bsize);",
"\treturn nbytes;\n}\n"
] |
[
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2014-9644",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2014-9644/",
"CWE ID": "CWE-264",
"codeLink": "https://github.com/torvalds/linux/commit/4943ba16bbc2db05115707b3ff7b4874e9e3c560",
"commit_id": "4943ba16bbc2db05115707b3ff7b4874e9e3c560",
"commit_message": "crypto: include crypto- module prefix in template\n\nThis adds the module loading prefix \"crypto-\" to the template lookup\nas well.\n\nFor example, attempting to load 'vfat(blowfish)' via AF_ALG now correctly\nincludes the \"crypto-\" prefix at every level, correctly rejecting \"vfat\":\n\n\tnet-pf-38\n\talgif-hash\n\tcrypto-vfat(blowfish)\n\tcrypto-vfat(blowfish)-all\n\tcrypto-vfat\n\nReported-by: Mathias Krause <minipli@googlemail.com>\nSigned-off-by: Kees Cook <keescook@chromium.org>\nAcked-by: Mathias Krause <minipli@googlemail.com>\nSigned-off-by: Herbert Xu <herbert@gondor.apana.org.au>",
"lang": "C",
"project": "linux"
}
| 32,885
|
Determine whether the code is vulnerable or not.
|
[
"archive_write_set_skip_file(struct archive *_a, int64_t d, int64_t i)\n{\n\tstruct archive_write *a = (struct archive_write *)_a;\n\tarchive_check_magic(&a->archive, ARCHIVE_WRITE_MAGIC,\n\t ARCHIVE_STATE_ANY, \"archive_write_set_skip_file\");\n\ta->skip_file_set = 1;\n\ta->skip_file_dev = d;\n\ta->skip_file_ino = i;\n\treturn (ARCHIVE_OK);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-0211",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-0211/",
"CWE ID": "CWE-189",
"codeLink": "https://github.com/libarchive/libarchive/commit/22531545514043e04633e1c015c7540b9de9dbe4",
"commit_id": "22531545514043e04633e1c015c7540b9de9dbe4",
"commit_message": "Limit write requests to at most INT_MAX.\nThis prevents a certain common programming error (passing -1 to write)\nfrom leading to other problems deeper in the library.",
"lang": "C",
"project": "libarchive"
}
| 32,887
|
Determine whether the code is vulnerable or not.
|
[
"GfxShadingPattern::GfxShadingPattern(GfxShading *shadingA, double *matrixA):\n GfxPattern(2)\n{\n int i;",
" shading = shadingA;\n for (i = 0; i < 6; ++i) {\n matrix[i] = matrixA[i];\n }\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2009-3605",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2009-3605/",
"CWE ID": "CWE-189",
"codeLink": "https://cgit.freedesktop.org/poppler/poppler/commit/?id=7b2d314a61fd0e12f47c62996cb49ec0d1ba747a",
"commit_id": "7b2d314a61fd0e12f47c62996cb49ec0d1ba747a",
"commit_message": null,
"lang": "CPP",
"project": "poppler"
}
| 32,891
|
Determine whether the code is vulnerable or not.
|
[
" RenderbufferManager* renderbuffer_manager() {\n return group_->renderbuffer_manager();\n }\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-2858",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-2858/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/chromium/chromium/commit/c13e1da62b5f5f0e6fe8c1f769a5a28415415244",
"commit_id": "c13e1da62b5f5f0e6fe8c1f769a5a28415415244",
"commit_message": "Revert \"Revert 100494 - Fix bug in SimulateAttrib0.\"\"\"\n\nTEST=none\nBUG=95625\nTBR=apatrick@chromium.org\n\nReview URL: http://codereview.chromium.org/7796016\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@100507 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,896
|
Determine whether the code is vulnerable or not.
|
[
"static bool hwsim_ps_rx_ok(struct mac80211_hwsim_data *data,\n\t\t\t struct sk_buff *skb)\n{\n\tswitch (data->ps) {\n\tcase PS_DISABLED:\n\t\treturn true;\n\tcase PS_ENABLED:\n\t\treturn false;\n\tcase PS_AUTO_POLL:\n\t\t/* TODO: accept (some) Beacons by default and other frames only\n\t\t * if pending PS-Poll has been sent */\n\t\treturn true;\n\tcase PS_MANUAL_POLL:\n\t\t/* Allow unicast frames to own address if there is a pending\n\t\t * PS-Poll */\n\t\tif (data->ps_poll_pending &&\n\t\t mac80211_hwsim_addr_match(data, skb->data + 4)) {\n\t\t\tdata->ps_poll_pending = false;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"\treturn true;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-8087",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-8087/",
"CWE ID": "CWE-772",
"codeLink": "https://github.com/torvalds/linux/commit/0ddcff49b672239dda94d70d0fcf50317a9f4b51",
"commit_id": "0ddcff49b672239dda94d70d0fcf50317a9f4b51",
"commit_message": "mac80211_hwsim: fix possible memory leak in hwsim_new_radio_nl()\n\n'hwname' is malloced in hwsim_new_radio_nl() and should be freed\nbefore leaving from the error handling cases, otherwise it will cause\nmemory leak.\n\nFixes: ff4dd73dd2b4 (\"mac80211_hwsim: check HWSIM_ATTR_RADIO_NAME length\")\nSigned-off-by: Wei Yongjun <weiyongjun1@huawei.com>\nReviewed-by: Ben Hutchings <ben.hutchings@codethink.co.uk>\nSigned-off-by: Johannes Berg <johannes.berg@intel.com>",
"lang": "C",
"project": "linux"
}
| 32,899
|
Determine whether the code is vulnerable or not.
|
[
"ChildThread* ChildThread::current() {\n return g_lazy_tls.Pointer()->Get();\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2014-3154",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2014-3154/",
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/f14efc560a12a513696d6396413b138879dabd7a",
"commit_id": "f14efc560a12a513696d6396413b138879dabd7a",
"commit_message": "[FileAPI] Clean up WebFileSystemImpl before Blink shutdown\n\nWebFileSystemImpl should not outlive V8 instance, since it may have references to V8.\nThis CL ensures it deleted before Blink shutdown.\n\nBUG=369525\n\nReview URL: https://codereview.chromium.org/270633009\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@269345 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,909
|
Determine whether the code is vulnerable or not.
|
[
" void OnPrintForPrintPreview(const DictionaryValue& dict) {\n PrintWebViewHelper::Get(view_)->OnPrintForPrintPreview(dict);\n }\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2012-2891",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2012-2891/",
"CWE ID": "CWE-200",
"codeLink": "https://github.com/chromium/chromium/commit/116d0963cadfbf55ef2ec3d13781987c4d80517a",
"commit_id": "116d0963cadfbf55ef2ec3d13781987c4d80517a",
"commit_message": "Print preview: Use an ID instead of memory pointer string in WebUI.\n\nBUG=144051\n\nReview URL: https://chromiumcodereview.appspot.com/10870003\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@153342 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,910
|
Determine whether the code is vulnerable or not.
|
[
"void RenderWidgetHostImpl::IncrementInFlightEventCount() {\n ++in_flight_event_count_;\n if (!is_hidden_)\n StartInputEventAckTimeout(hung_renderer_delay_);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-17467",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-17467/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/chromium/chromium/commit/7da6c3419fd172405bcece1ae4ec6ec8316cd345",
"commit_id": "7da6c3419fd172405bcece1ae4ec6ec8316cd345",
"commit_message": "Start rendering timer after first navigation\n\nCurrently the new content rendering timer in the browser process,\nwhich clears an old page's contents 4 seconds after a navigation if the\nnew page doesn't draw in that time, is not set on the first navigation\nfor a top-level frame.\n\nThis is problematic because content can exist before the first\nnavigation, for instance if it was created by a javascript: URL.\n\nThis CL removes the code that skips the timer activation on the first\nnavigation.\n\nBug: 844881\nChange-Id: I19b3ad1ff62c69ded3a5f7b1c0afde191aaf4584\nReviewed-on: https://chromium-review.googlesource.com/1188589\nReviewed-by: Fady Samuel <fsamuel@chromium.org>\nReviewed-by: ccameron <ccameron@chromium.org>\nCommit-Queue: Ken Buchanan <kenrb@chromium.org>\nCr-Commit-Position: refs/heads/master@{#586913}",
"lang": "C",
"project": "Chrome"
}
| 32,922
|
Determine whether the code is vulnerable or not.
|
[
"static int _etc_hosts_lookup(const char *cszName, char *szIP, const int ciMaxIPLen) {\n#define EHL_LINE_LEN 260\n int iSuccess = 0;\n size_t iLen;\n char szLine[EHL_LINE_LEN + 1]; /* one extra for the space character (*) */\n char *pcStart, *pcEnd;\n FILE *fHosts;",
" do {\n /* initialization */\n fHosts = NULL;",
" /* sanity checks */\n if ((cszName == NULL) || (szIP == NULL) || (ciMaxIPLen <= 0))\n break;\n szIP[0] = 0;",
" /* open the hosts file */\n#ifdef _WIN32\n pcStart = getenv(\"WINDIR\");\n if (pcStart != NULL) {\n sprintf(szLine, \"%s\\\\system32\\\\drivers\\\\etc\\\\hosts\", pcStart);\n } else {\n strcpy(szLine, \"C:\\\\WINDOWS\\\\system32\\\\drivers\\\\etc\\\\hosts\");\n }\n#else\n strcpy(szLine, \"/etc/hosts\");\n#endif\n fHosts = fopen(szLine, \"r\");\n if (fHosts == NULL)\n break;",
" /* read line by line ... */\n while (fgets(szLine, EHL_LINE_LEN, fHosts) != NULL) {\n /* remove comments */\n pcStart = strchr (szLine, '#');\n if (pcStart != NULL)\n *pcStart = 0;\n strcat(szLine, \" \"); /* append a space character for easier parsing (*) */",
" /* first to appear: IP address */\n iLen = strspn(szLine, \"1234567890.\");\n if ((iLen < 7) || (iLen > 15)) /* superficial test for anything between x.x.x.x and xxx.xxx.xxx.xxx */\n continue;\n pcEnd = szLine + iLen;\n *pcEnd = 0;\n pcEnd++; /* not beyond the end of the line yet (*) */",
" /* check strings separated by blanks, tabs or newlines */\n pcStart = pcEnd + strspn(pcEnd, \" \\t\\n\");\n while (*pcStart != 0) {\n pcEnd = pcStart + strcspn(pcStart, \" \\t\\n\");\n *pcEnd = 0;\n pcEnd++; /* not beyond the end of the line yet (*) */",
" if (strcasecmp(pcStart, cszName) == 0) {\n strncpy(szIP, szLine, ciMaxIPLen - 1);\n szIP[ciMaxIPLen - 1] = '\\0';\n iSuccess = 1;\n break;\n }",
" pcStart = pcEnd + strspn(pcEnd, \" \\t\\n\");\n }\n if (iSuccess)\n break;\n }\n } while (0);",
" if (fHosts != NULL)\n fclose(fHosts);",
" return (iSuccess);\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2012-3525",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2012-3525/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/Jabberd2/jabberd2/commit/aabcffae560d5fd00cd1d2ffce5d760353cf0a4d",
"commit_id": "aabcffae560d5fd00cd1d2ffce5d760353cf0a4d",
"commit_message": "Fixed possibility of Unsolicited Dialback Attacks",
"lang": "C",
"project": "jabberd2"
}
| 32,925
|
Determine whether the code is vulnerable or not.
|
[
" static int perf_event_period(struct perf_event *event, u64 __user *arg)\n{\n\tstruct perf_event_context *ctx = event->ctx;\n\tint ret = 0, active;\n\tu64 value;",
"\tif (!is_sampling_event(event))\n\t\treturn -EINVAL;",
"\tif (copy_from_user(&value, arg, sizeof(value)))\n\t\treturn -EFAULT;",
"\tif (!value)\n\t\treturn -EINVAL;",
"\traw_spin_lock_irq(&ctx->lock);\n\tif (event->attr.freq) {\n\t\tif (value > sysctl_perf_event_sample_rate) {\n\t\t\tret = -EINVAL;\n\t\t\tgoto unlock;\n\t\t}",
"\t\tevent->attr.sample_freq = value;\n\t} else {\n\t\tevent->attr.sample_period = value;\n\t\tevent->hw.sample_period = value;\n\t}",
"\tactive = (event->state == PERF_EVENT_STATE_ACTIVE);\n\tif (active) {\n\t\tperf_pmu_disable(ctx->pmu);\n\t\tevent->pmu->stop(event, PERF_EF_UPDATE);\n\t}",
"\tlocal64_set(&event->hw.period_left, 0);",
"\tif (active) {\n\t\tevent->pmu->start(event, PERF_EF_RELOAD);\n\t\tperf_pmu_enable(ctx->pmu);\n\t}",
"unlock:\n\traw_spin_unlock_irq(&ctx->lock);",
"\treturn ret;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-6787",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-6787/",
"CWE ID": "CWE-264",
"codeLink": "https://github.com/torvalds/linux/commit/f63a8daa5812afef4f06c962351687e1ff9ccb2b",
"commit_id": "f63a8daa5812afef4f06c962351687e1ff9ccb2b",
"commit_message": "perf: Fix event->ctx locking\n\nThere have been a few reported issues wrt. the lack of locking around\nchanging event->ctx. This patch tries to address those.\n\nIt avoids the whole rwsem thing; and while it appears to work, please\ngive it some thought in review.\n\nWhat I did fail at is sensible runtime checks on the use of\nevent->ctx, the RCU use makes it very hard.\n\nSigned-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>\nCc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Arnaldo Carvalho de Melo <acme@kernel.org>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nLink: http://lkml.kernel.org/r/20150123125834.209535886@infradead.org\nSigned-off-by: Ingo Molnar <mingo@kernel.org>",
"lang": "C",
"project": "linux"
}
| 32,926
|
Determine whether the code is vulnerable or not.
|
[
"int do_unknown_trapa(unsigned long scId, struct pt_regs *regs)\n{\n\t/* Syscall debug */\n printk(\"System call ID error: [0x1#args:8 #syscall:16 0x%lx]\\n\", scId);",
"\tdie_if_kernel(\"unknown trapa\", regs, scId);",
"\treturn -ENOSYS;\n}\n"
] |
[
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-2918",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-2918/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/torvalds/linux/commit/a8b0ca17b80e92faab46ee7179ba9e99ccb61233",
"commit_id": "a8b0ca17b80e92faab46ee7179ba9e99ccb61233",
"commit_message": "perf: Remove the nmi parameter from the swevent and overflow interface\n\nThe nmi parameter indicated if we could do wakeups from the current\ncontext, if not, we would set some state and self-IPI and let the\nresulting interrupt do the wakeup.\n\nFor the various event classes:\n\n - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from\n the PMI-tail (ARM etc.)\n - tracepoint: nmi=0; since tracepoint could be from NMI context.\n - software: nmi=[0,1]; some, like the schedule thing cannot\n perform wakeups, and hence need 0.\n\nAs one can see, there is very little nmi=1 usage, and the down-side of\nnot using it is that on some platforms some software events can have a\njiffy delay in wakeup (when arch_irq_work_raise isn't implemented).\n\nThe up-side however is that we can remove the nmi parameter and save a\nbunch of conditionals in fast paths.\n\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Michael Cree <mcree@orcon.net.nz>\nCc: Will Deacon <will.deacon@arm.com>\nCc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>\nCc: Anton Blanchard <anton@samba.org>\nCc: Eric B Munson <emunson@mgebm.net>\nCc: Heiko Carstens <heiko.carstens@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Frederic Weisbecker <fweisbec@gmail.com>\nCc: Jason Wessel <jason.wessel@windriver.com>\nCc: Don Zickus <dzickus@redhat.com>\nLink: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org\nSigned-off-by: Ingo Molnar <mingo@elte.hu>",
"lang": "C",
"project": "linux"
}
| 32,930
|
Determine whether the code is vulnerable or not.
|
[
" void set_plugin_enabled(const FilePath& plugin_path, bool enabled) {\n plugin_state_[plugin_path] = enabled;\n }\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-0910",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-0910/",
"CWE ID": "CWE-287",
"codeLink": "https://github.com/chromium/chromium/commit/ac8bd041b81e46e4e4fcd5021aaa5499703952e6",
"commit_id": "ac8bd041b81e46e4e4fcd5021aaa5499703952e6",
"commit_message": "Follow-on fixes and naming changes for https://codereview.chromium.org/12086077/\n\nBUG=172573\nReview URL: https://codereview.chromium.org/12177018\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@180600 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,931
|
Determine whether the code is vulnerable or not.
|
[
"void GLES2DecoderImpl::DoUniformMatrix2fv(\n GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {\n GLenum type = 0;\n if (!PrepForSetUniformByLocation(\n location, \"glUniformMatrix2fv\", &type, &count)) {\n return;\n }\n glUniformMatrix2fv (location, count, transpose, value);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-2858",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-2858/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/chromium/chromium/commit/c13e1da62b5f5f0e6fe8c1f769a5a28415415244",
"commit_id": "c13e1da62b5f5f0e6fe8c1f769a5a28415415244",
"commit_message": "Revert \"Revert 100494 - Fix bug in SimulateAttrib0.\"\"\"\n\nTEST=none\nBUG=95625\nTBR=apatrick@chromium.org\n\nReview URL: http://codereview.chromium.org/7796016\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@100507 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,933
|
Determine whether the code is vulnerable or not.
|
[
"void WebContentsImpl::OnUpdateFaviconURL(\n int32 page_id,\n const std::vector<FaviconURL>& candidates) {\n FOR_EACH_OBSERVER(WebContentsObserver, observers_,\n DidUpdateFaviconURL(page_id, candidates));\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-6626",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-6626/",
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/90fb08ed0146c9beacfd4dde98a20fc45419fff3",
"commit_id": "90fb08ed0146c9beacfd4dde98a20fc45419fff3",
"commit_message": "Cancel JavaScript dialogs when an interstitial appears.\n\nBUG=295695\nTEST=See bug for repro steps.\n\nReview URL: https://chromiumcodereview.appspot.com/24360011\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@225026 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,940
|
Determine whether the code is vulnerable or not.
|
[
"static ut64 binobj_a2b(RBinObject *o, ut64 addr) {\n\treturn addr + (o? o->baddr_shift: 0);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-16358",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-16358/",
"CWE ID": "CWE-125",
"codeLink": "https://github.com/radare/radare2/commit/d31c4d3cbdbe01ea3ded16a584de94149ecd31d9",
"commit_id": "d31c4d3cbdbe01ea3ded16a584de94149ecd31d9",
"commit_message": "Fix #8748 - Fix oobread on string search",
"lang": "C",
"project": "radare2"
}
| 32,942
|
Determine whether the code is vulnerable or not.
|
[
"static bool search_nested_keyrings(struct key *keyring,\n\t\t\t\t struct keyring_search_context *ctx)\n{\n\tstruct {\n\t\tstruct key *keyring;\n\t\tstruct assoc_array_node *node;\n\t\tint slot;\n\t} stack[KEYRING_SEARCH_MAX_DEPTH];",
"\tstruct assoc_array_shortcut *shortcut;\n\tstruct assoc_array_node *node;\n\tstruct assoc_array_ptr *ptr;\n\tstruct key *key;\n\tint sp = 0, slot;",
"\tkenter(\"{%d},{%s,%s}\",\n\t keyring->serial,\n\t ctx->index_key.type->name,\n\t ctx->index_key.description);",
"\tif (ctx->index_key.description)\n\t\tctx->index_key.desc_len = strlen(ctx->index_key.description);",
"\t/* Check to see if this top-level keyring is what we are looking for\n\t * and whether it is valid or not.\n\t */\n\tif (ctx->match_data.lookup_type == KEYRING_SEARCH_LOOKUP_ITERATE ||\n\t keyring_compare_object(keyring, &ctx->index_key)) {\n\t\tctx->skipped_ret = 2;\n\t\tctx->flags |= KEYRING_SEARCH_DO_STATE_CHECK;\n\t\tswitch (ctx->iterator(keyring_key_to_ptr(keyring), ctx)) {\n\t\tcase 1:\n\t\t\tgoto found;\n\t\tcase 2:\n\t\t\treturn false;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"\tctx->skipped_ret = 0;\n\tif (ctx->flags & KEYRING_SEARCH_NO_STATE_CHECK)\n\t\tctx->flags &= ~KEYRING_SEARCH_DO_STATE_CHECK;",
"\t/* Start processing a new keyring */\ndescend_to_keyring:\n\tkdebug(\"descend to %d\", keyring->serial);\n\tif (keyring->flags & ((1 << KEY_FLAG_INVALIDATED) |\n\t\t\t (1 << KEY_FLAG_REVOKED)))\n\t\tgoto not_this_keyring;",
"\t/* Search through the keys in this keyring before its searching its\n\t * subtrees.\n\t */\n\tif (search_keyring(keyring, ctx))\n\t\tgoto found;",
"\t/* Then manually iterate through the keyrings nested in this one.\n\t *\n\t * Start from the root node of the index tree. Because of the way the\n\t * hash function has been set up, keyrings cluster on the leftmost\n\t * branch of the root node (root slot 0) or in the root node itself.\n\t * Non-keyrings avoid the leftmost branch of the root entirely (root\n\t * slots 1-15).\n\t */\n\tptr = ACCESS_ONCE(keyring->keys.root);\n\tif (!ptr)\n\t\tgoto not_this_keyring;",
"\tif (assoc_array_ptr_is_shortcut(ptr)) {\n\t\t/* If the root is a shortcut, either the keyring only contains\n\t\t * keyring pointers (everything clusters behind root slot 0) or\n\t\t * doesn't contain any keyring pointers.\n\t\t */\n\t\tshortcut = assoc_array_ptr_to_shortcut(ptr);\n\t\tsmp_read_barrier_depends();\n\t\tif ((shortcut->index_key[0] & ASSOC_ARRAY_FAN_MASK) != 0)\n\t\t\tgoto not_this_keyring;",
"\t\tptr = ACCESS_ONCE(shortcut->next_node);\n\t\tnode = assoc_array_ptr_to_node(ptr);\n\t\tgoto begin_node;\n\t}",
"\tnode = assoc_array_ptr_to_node(ptr);\n\tsmp_read_barrier_depends();",
"\tptr = node->slots[0];\n\tif (!assoc_array_ptr_is_meta(ptr))\n\t\tgoto begin_node;",
"descend_to_node:\n\t/* Descend to a more distal node in this keyring's content tree and go\n\t * through that.\n\t */\n\tkdebug(\"descend\");\n\tif (assoc_array_ptr_is_shortcut(ptr)) {\n\t\tshortcut = assoc_array_ptr_to_shortcut(ptr);\n\t\tsmp_read_barrier_depends();\n\t\tptr = ACCESS_ONCE(shortcut->next_node);\n\t\tBUG_ON(!assoc_array_ptr_is_node(ptr));\n\t}\n\tnode = assoc_array_ptr_to_node(ptr);",
"begin_node:\n\tkdebug(\"begin_node\");\n\tsmp_read_barrier_depends();\n\tslot = 0;\nascend_to_node:\n\t/* Go through the slots in a node */\n\tfor (; slot < ASSOC_ARRAY_FAN_OUT; slot++) {\n\t\tptr = ACCESS_ONCE(node->slots[slot]);",
"\t\tif (assoc_array_ptr_is_meta(ptr) && node->back_pointer)\n\t\t\tgoto descend_to_node;",
"\t\tif (!keyring_ptr_is_keyring(ptr))\n\t\t\tcontinue;",
"\t\tkey = keyring_ptr_to_key(ptr);",
"\t\tif (sp >= KEYRING_SEARCH_MAX_DEPTH) {\n\t\t\tif (ctx->flags & KEYRING_SEARCH_DETECT_TOO_DEEP) {\n\t\t\t\tctx->result = ERR_PTR(-ELOOP);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tgoto not_this_keyring;\n\t\t}",
"\t\t/* Search a nested keyring */\n\t\tif (!(ctx->flags & KEYRING_SEARCH_NO_CHECK_PERM) &&\n\t\t key_task_permission(make_key_ref(key, ctx->possessed),\n\t\t\t\t\tctx->cred, KEY_NEED_SEARCH) < 0)\n\t\t\tcontinue;",
"\t\t/* stack the current position */\n\t\tstack[sp].keyring = keyring;\n\t\tstack[sp].node = node;\n\t\tstack[sp].slot = slot;\n\t\tsp++;",
"\t\t/* begin again with the new keyring */\n\t\tkeyring = key;\n\t\tgoto descend_to_keyring;\n\t}",
"\t/* We've dealt with all the slots in the current node, so now we need\n\t * to ascend to the parent and continue processing there.\n\t */\n\tptr = ACCESS_ONCE(node->back_pointer);\n\tslot = node->parent_slot;",
"\tif (ptr && assoc_array_ptr_is_shortcut(ptr)) {\n\t\tshortcut = assoc_array_ptr_to_shortcut(ptr);\n\t\tsmp_read_barrier_depends();\n\t\tptr = ACCESS_ONCE(shortcut->back_pointer);\n\t\tslot = shortcut->parent_slot;\n\t}\n\tif (!ptr)\n\t\tgoto not_this_keyring;\n\tnode = assoc_array_ptr_to_node(ptr);\n\tsmp_read_barrier_depends();\n\tslot++;",
"\t/* If we've ascended to the root (zero backpointer), we must have just\n\t * finished processing the leftmost branch rather than the root slots -\n\t * so there can't be any more keyrings for us to find.\n\t */\n\tif (node->back_pointer) {\n\t\tkdebug(\"ascend %d\", slot);\n\t\tgoto ascend_to_node;\n\t}",
"\t/* The keyring we're looking at was disqualified or didn't contain a\n\t * matching key.\n\t */\nnot_this_keyring:\n\tkdebug(\"not_this_keyring %d\", sp);\n\tif (sp <= 0) {\n\t\tkleave(\" = false\");\n\t\treturn false;\n\t}",
"\t/* Resume the processing of a keyring higher up in the tree */\n\tsp--;\n\tkeyring = stack[sp].keyring;\n\tnode = stack[sp].node;\n\tslot = stack[sp].slot + 1;\n\tkdebug(\"ascend to %d [%d]\", keyring->serial, slot);\n\tgoto ascend_to_node;",
"\t/* We found a viable match */\nfound:\n\tkey = key_ref_to_ptr(ctx->result);\n\tkey_check(key);\n\tif (!(ctx->flags & KEYRING_SEARCH_NO_UPDATE_TIME)) {\n\t\tkey->last_used_at = ctx->now.tv_sec;\n\t\tkeyring->last_used_at = ctx->now.tv_sec;\n\t\twhile (sp > 0)\n\t\t\tstack[--sp].keyring->last_used_at = ctx->now.tv_sec;\n\t}\n\tkleave(\" = true\");\n\treturn true;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-2647",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-2647/",
"CWE ID": "CWE-476",
"codeLink": "https://github.com/torvalds/linux/commit/c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81",
"commit_id": "c06cfb08b88dfbe13be44a69ae2fdc3a7c902d81",
"commit_message": "KEYS: Remove key_type::match in favour of overriding default by match_preparse\n\nA previous patch added a ->match_preparse() method to the key type. This is\nallowed to override the function called by the iteration algorithm.\nTherefore, we can just set a default that simply checks for an exact match of\nthe key description with the original criterion data and allow match_preparse\nto override it as needed.\n\nThe key_type::match op is then redundant and can be removed, as can the\nuser_match() function.\n\nSigned-off-by: David Howells <dhowells@redhat.com>\nAcked-by: Vivek Goyal <vgoyal@redhat.com>",
"lang": "C",
"project": "linux"
}
| 32,943
|
Determine whether the code is vulnerable or not.
|
[
"static inline int tx_work_todo(struct xen_netbk *netbk)\n{",
"\tif (((nr_pending_reqs(netbk) + MAX_SKB_FRAGS) < MAX_PENDING_REQS) &&\n\t\t\t!list_empty(&netbk->net_schedule_list))\n\t\treturn 1;",
"\treturn 0;\n}\n"
] |
[
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-0217",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-0217/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/torvalds/linux/commit/7d5145d8eb2b9791533ffe4dc003b129b9696c48",
"commit_id": "7d5145d8eb2b9791533ffe4dc003b129b9696c48",
"commit_message": "xen/netback: don't leak pages on failure in xen_netbk_tx_check_gop.\n\nSigned-off-by: Matthew Daley <mattjd@gmail.com>\nReviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>\nAcked-by: Ian Campbell <ian.campbell@citrix.com>\nAcked-by: Jan Beulich <JBeulich@suse.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 32,946
|
Determine whether the code is vulnerable or not.
|
[
"nfsd4_setclientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,\n\t\t struct nfsd4_setclientid *setclid)\n{\n\tstruct xdr_netobj \tclname = setclid->se_name;\n\tnfs4_verifier\t\tclverifier = setclid->se_verf;\n\tstruct nfs4_client\t*conf, *new;\n\tstruct nfs4_client\t*unconf = NULL;\n\t__be32 \t\t\tstatus;\n\tstruct nfsd_net\t\t*nn = net_generic(SVC_NET(rqstp), nfsd_net_id);",
"\tnew = create_client(clname, rqstp, &clverifier);\n\tif (new == NULL)\n\t\treturn nfserr_jukebox;\n\t/* Cases below refer to rfc 3530 section 14.2.33: */\n\tspin_lock(&nn->client_lock);\n\tconf = find_confirmed_client_by_name(&clname, nn);\n\tif (conf && client_has_state(conf)) {\n\t\t/* case 0: */\n\t\tstatus = nfserr_clid_inuse;\n\t\tif (clp_used_exchangeid(conf))\n\t\t\tgoto out;\n\t\tif (!same_creds(&conf->cl_cred, &rqstp->rq_cred)) {\n\t\t\tchar addr_str[INET6_ADDRSTRLEN];\n\t\t\trpc_ntop((struct sockaddr *) &conf->cl_addr, addr_str,\n\t\t\t\t sizeof(addr_str));\n\t\t\tdprintk(\"NFSD: setclientid: string in use by client \"\n\t\t\t\t\"at %s\\n\", addr_str);\n\t\t\tgoto out;\n\t\t}\n\t}\n\tunconf = find_unconfirmed_client_by_name(&clname, nn);\n\tif (unconf)\n\t\tunhash_client_locked(unconf);\n\tif (conf && same_verf(&conf->cl_verifier, &clverifier)) {\n\t\t/* case 1: probable callback update */\n\t\tcopy_clid(new, conf);\n\t\tgen_confirm(new, nn);\n\t} else /* case 4 (new client) or cases 2, 3 (client reboot): */\n\t\tgen_clid(new, nn);\n\tnew->cl_minorversion = 0;\n\tgen_callback(new, setclid, rqstp);\n\tadd_to_unconfirmed(new);\n\tsetclid->se_clientid.cl_boot = new->cl_clientid.cl_boot;\n\tsetclid->se_clientid.cl_id = new->cl_clientid.cl_id;\n\tmemcpy(setclid->se_confirm.data, new->cl_confirm.data, sizeof(setclid->se_confirm.data));\n\tnew = NULL;\n\tstatus = nfs_ok;\nout:\n\tspin_unlock(&nn->client_lock);\n\tif (new)\n\t\tfree_client(new);\n\tif (unconf)\n\t\texpire_client(unconf);\n\treturn status;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-9059",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-9059/",
"CWE ID": "CWE-404",
"codeLink": "https://github.com/torvalds/linux/commit/c70422f760c120480fee4de6c38804c72aa26bc1",
"commit_id": "c70422f760c120480fee4de6c38804c72aa26bc1",
"commit_message": "Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux\n\nPull nfsd updates from Bruce Fields:\n \"Another RDMA update from Chuck Lever, and a bunch of miscellaneous\n bugfixes\"\n\n* tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits)\n nfsd: Fix up the \"supattr_exclcreat\" attributes\n nfsd: encoders mustn't use unitialized values in error cases\n nfsd: fix undefined behavior in nfsd4_layout_verify\n lockd: fix lockd shutdown race\n NFSv4: Fix callback server shutdown\n SUNRPC: Refactor svc_set_num_threads()\n NFSv4.x/callback: Create the callback service through svc_create_pooled\n lockd: remove redundant check on block\n svcrdma: Clean out old XDR encoders\n svcrdma: Remove the req_map cache\n svcrdma: Remove unused RDMA Write completion handler\n svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt\n svcrdma: Clean up RPC-over-RDMA backchannel reply processing\n svcrdma: Report Write/Reply chunk overruns\n svcrdma: Clean up RDMA_ERROR path\n svcrdma: Use rdma_rw API in RPC reply path\n svcrdma: Introduce local rdma_rw API helpers\n svcrdma: Clean up svc_rdma_get_inv_rkey()\n svcrdma: Add helper to save pages under I/O\n svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT\n ...",
"lang": "C",
"project": "linux"
}
| 32,947
|
Determine whether the code is vulnerable or not.
|
[
"static int do_recv_NPFullPrint(rpc_message_t *message, void *p_value)\n{\n NPFullPrint *fullPrint = (NPFullPrint *)p_value;\n uint32_t pluginPrinted, printOne;\n int error;",
" if ((error = rpc_message_recv_uint32(message, &pluginPrinted)) < 0)\n\treturn error;\n if ((error = rpc_message_recv_uint32(message, &printOne)) < 0)\n\treturn error;",
" fullPrint->pluginPrinted = pluginPrinted;\n fullPrint->printOne = printOne;\n fullPrint->platformPrint = NULL; // to be filled in by the plugin\n return RPC_ERROR_NO_ERROR;\n}\n"
] |
[
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-2486",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-2486/",
"CWE ID": "CWE-264",
"codeLink": "https://github.com/davidben/nspluginwrapper/commit/7e4ab8e1189846041f955e6c83f72bc1624e7a98",
"commit_id": "7e4ab8e1189846041f955e6c83f72bc1624e7a98",
"commit_message": "Support all the new variables added",
"lang": "C",
"project": "nspluginwrapper"
}
| 32,950
|
Determine whether the code is vulnerable or not.
|
[
"static h2_session *h2_session_create_int(conn_rec *c,\n request_rec *r,\n h2_ctx *ctx, \n h2_workers *workers)\n{\n nghttp2_session_callbacks *callbacks = NULL;\n nghttp2_option *options = NULL;\n uint32_t n;",
" apr_pool_t *pool = NULL;\n apr_status_t status = apr_pool_create(&pool, c->pool);\n h2_session *session;\n if (status != APR_SUCCESS) {\n return NULL;\n }\n apr_pool_tag(pool, \"h2_session\");",
" session = apr_pcalloc(pool, sizeof(h2_session));\n if (session) {\n int rv;\n nghttp2_mem *mem;\n \n session->id = c->id;\n session->c = c;\n session->r = r;\n session->s = h2_ctx_server_get(ctx);\n session->pool = pool;\n session->config = h2_config_sget(session->s);\n session->workers = workers;\n \n session->state = H2_SESSION_ST_INIT;\n session->local.accepting = 1;\n session->remote.accepting = 1;\n \n apr_pool_pre_cleanup_register(pool, session, session_pool_cleanup);\n \n session->max_stream_count = h2_config_geti(session->config, \n H2_CONF_MAX_STREAMS);\n session->max_stream_mem = h2_config_geti(session->config, \n H2_CONF_STREAM_MAX_MEM);",
" status = apr_thread_cond_create(&session->iowait, session->pool);\n if (status != APR_SUCCESS) {\n return NULL;\n }\n \n session->mplx = h2_mplx_create(c, session->pool, session->config, \n session->s->timeout, workers);\n \n h2_mplx_set_consumed_cb(session->mplx, update_window, session);\n \n /* Install the connection input filter that feeds the session */\n session->cin = h2_filter_cin_create(session->pool, \n h2_session_receive, session);\n ap_add_input_filter(\"H2_IN\", session->cin, r, c);",
" h2_conn_io_init(&session->io, c, session->config);\n session->bbtmp = apr_brigade_create(session->pool, c->bucket_alloc);\n \n status = init_callbacks(c, &callbacks);\n if (status != APR_SUCCESS) {\n ap_log_cerror(APLOG_MARK, APLOG_ERR, status, c, APLOGNO(02927) \n \"nghttp2: error in init_callbacks\");\n h2_session_destroy(session);\n return NULL;\n }\n \n rv = nghttp2_option_new(&options);\n if (rv != 0) {\n ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, c,\n APLOGNO(02928) \"nghttp2_option_new: %s\", \n nghttp2_strerror(rv));\n h2_session_destroy(session);\n return NULL;\n }\n nghttp2_option_set_peer_max_concurrent_streams(\n options, (uint32_t)session->max_stream_count);\n /* We need to handle window updates ourself, otherwise we\n * get flooded by nghttp2. */\n nghttp2_option_set_no_auto_window_update(options, 1);\n \n if (APLOGctrace6(c)) {\n mem = apr_pcalloc(session->pool, sizeof(nghttp2_mem));\n mem->mem_user_data = session;\n mem->malloc = session_malloc;\n mem->free = session_free;\n mem->calloc = session_calloc;\n mem->realloc = session_realloc;\n \n rv = nghttp2_session_server_new3(&session->ngh2, callbacks,\n session, options, mem);\n }\n else {\n rv = nghttp2_session_server_new2(&session->ngh2, callbacks,\n session, options);\n }\n nghttp2_session_callbacks_del(callbacks);\n nghttp2_option_del(options);\n \n if (rv != 0) {\n ap_log_cerror(APLOG_MARK, APLOG_ERR, APR_EGENERAL, c,\n APLOGNO(02929) \"nghttp2_session_server_new: %s\",\n nghttp2_strerror(rv));\n h2_session_destroy(session);\n return NULL;\n }\n \n n = h2_config_geti(session->config, H2_CONF_PUSH_DIARY_SIZE);\n session->push_diary = h2_push_diary_create(session->pool, n);\n \n if (APLOGcdebug(c)) {\n ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, c, APLOGNO(03200)\n \"h2_session(%ld) created, max_streams=%d, \"\n \"stream_mem=%d, workers_limit=%d, workers_max=%d, \"\n \"push_diary(type=%d,N=%d)\",\n session->id, (int)session->max_stream_count, \n (int)session->max_stream_mem,\n session->mplx->workers_limit, \n session->mplx->workers_max, \n session->push_diary->dtype, \n (int)session->push_diary->N);\n }\n }\n return session;\n}\n"
] |
[
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-8740",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-8740/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/apache/httpd/commit/29c63b786ae028d82405421585e91283c8fa0da3",
"commit_id": "29c63b786ae028d82405421585e91283c8fa0da3",
"commit_message": "SECURITY: CVE-2016-8740\n\nmod_http2: properly crafted, endless HTTP/2 CONTINUATION frames could be used to exhaust all server's memory.\n\nReported by: Naveen Tiwari <naveen.tiwari@asu.edu> and CDF/SEFCOM at Arizona State University\n\n\n\ngit-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1772576 13f79535-47bb-0310-9956-ffa450edef68",
"lang": "C",
"project": "httpd"
}
| 32,952
|
Determine whether the code is vulnerable or not.
|
[
" OVS_EXCLUDED(ofproto_mutex)\n{\n struct oftable *table;",
" cmap_destroy(&ofproto->groups);",
" hmap_remove(&all_ofprotos, &ofproto->hmap_node);",
" free(ofproto->name);\n free(ofproto->type);\n free(ofproto->mfr_desc);\n free(ofproto->hw_desc);\n free(ofproto->sw_desc);\n free(ofproto->serial_desc);\n free(ofproto->dp_desc);\n hmap_destroy(&ofproto->ports);\n hmap_destroy(&ofproto->ofport_usage);\n shash_destroy(&ofproto->port_by_name);\n simap_destroy(&ofproto->ofp_requests);",
" OFPROTO_FOR_EACH_TABLE (table, ofproto) {\n oftable_destroy(table);\n }\n free(ofproto->tables);",
" ovs_mutex_lock(&ofproto->vl_mff_map.mutex);\n mf_vl_mff_map_clear(&ofproto->vl_mff_map, true);\n ovs_mutex_unlock(&ofproto->vl_mff_map.mutex);\n cmap_destroy(&ofproto->vl_mff_map.cmap);\n ovs_mutex_destroy(&ofproto->vl_mff_map.mutex);\n tun_metadata_free(ovsrcu_get_protected(struct tun_table *,\n &ofproto->metadata_tab));",
" ovs_assert(hindex_is_empty(&ofproto->cookies));\n hindex_destroy(&ofproto->cookies);",
" ovs_assert(hmap_is_empty(&ofproto->learned_cookies));\n hmap_destroy(&ofproto->learned_cookies);",
" ofproto->ofproto_class->dealloc(ofproto);\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-17205",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-17205/",
"CWE ID": "CWE-617",
"codeLink": "https://github.com/openvswitch/ovs/commit/0befd1f3745055c32940f5faf9559be6a14395e6",
"commit_id": "0befd1f3745055c32940f5faf9559be6a14395e6",
"commit_message": "ofproto: Fix OVS crash when reverting old flows in bundle commit\n\nDuring bundle commit flows which are added in bundle are applied\nto ofproto in-order. In case if a flow cannot be added (e.g. flow\naction is go-to group id which does not exist), OVS tries to\nrevert back all previous flows which were successfully applied\nfrom the same bundle. This is possible since OVS maintains list\nof old flows which were replaced by flows from the bundle.\n\nWhile reinserting old flows ovs asserts due to check on rule\nstate != RULE_INITIALIZED. This will work only for new flows, but\nfor old flow the rule state will be RULE_REMOVED. This is causing\nan assert and OVS crash.\n\nThe ovs assert check should be modified to != RULE_INSERTED to prevent\nany existing rule being re-inserted and allow new rules and old rules\n(in case of revert) to get inserted.\n\nHere is an example to trigger the assert:\n\n$ ovs-vsctl add-br br-test -- set Bridge br-test datapath_type=netdev\n\n$ cat flows.txt\nflow add table=1,priority=0,in_port=2,actions=NORMAL\nflow add table=1,priority=0,in_port=3,actions=NORMAL\n\n$ ovs-ofctl dump-flows -OOpenflow13 br-test\n cookie=0x0, duration=2.465s, table=1, n_packets=0, n_bytes=0, priority=0,in_port=2 actions=NORMAL\n cookie=0x0, duration=2.465s, table=1, n_packets=0, n_bytes=0, priority=0,in_port=3 actions=NORMAL\n\n$ cat flow-modify.txt\nflow modify table=1,priority=0,in_port=2,actions=drop\nflow modify table=1,priority=0,in_port=3,actions=group:10\n\n$ ovs-ofctl bundle br-test flow-modify.txt -OOpenflow13\n\nFirst flow rule will be modified since it is a valid rule. However second\nrule is invalid since no group with id 10 exists. Bundle commit tries to\nrevert (insert) the first rule to old flow which results in ovs_assert at\nofproto_rule_insert__() since old rule->state = RULE_REMOVED.\n\nSigned-off-by: Vishal Deep Ajmera <vishal.deep.ajmera@ericsson.com>\nSigned-off-by: Ben Pfaff <blp@ovn.org>",
"lang": "C",
"project": "ovs"
}
| 32,953
|
Determine whether the code is vulnerable or not.
|
[
"u32 hns_rcb_get_coalesce_usecs(\n\tstruct rcb_common_cb *rcb_common, u32 port_idx)\n{\n\tif (AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver))\n\t\treturn dsaf_read_dev(rcb_common, RCB_CFG_OVERTIME_REG) /\n\t\t HNS_RCB_CLK_FREQ_MHZ;\n\telse\n\t\treturn dsaf_read_dev(rcb_common,\n\t\t\t\t RCB_PORT_CFG_OVERTIME_REG + port_idx * 4);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-18222",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-18222/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/torvalds/linux/commit/412b65d15a7f8a93794653968308fc100f2aa87c",
"commit_id": "412b65d15a7f8a93794653968308fc100f2aa87c",
"commit_message": "net: hns: fix ethtool_get_strings overflow in hns driver\n\nhns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated\nis not enough for ethtool_get_strings(), which will cause random memory\ncorruption.\n\nWhen SLAB and DEBUG_SLAB are both enabled, memory corruptions like the\nthe following can be observed without this patch:\n[ 43.115200] Slab corruption (Not tainted): Acpi-ParseExt start=ffff801fb0b69030, len=80\n[ 43.115206] Redzone: 0x9f911029d006462/0x5f78745f31657070.\n[ 43.115208] Last user: [<5f7272655f746b70>](0x5f7272655f746b70)\n[ 43.115214] 010: 70 70 65 31 5f 74 78 5f 70 6b 74 00 6b 6b 6b 6b ppe1_tx_pkt.kkkk\n[ 43.115217] 030: 70 70 65 31 5f 74 78 5f 70 6b 74 5f 6f 6b 00 6b ppe1_tx_pkt_ok.k\n[ 43.115218] Next obj: start=ffff801fb0b69098, len=80\n[ 43.115220] Redzone: 0x706d655f6f666966/0x9f911029d74e35b.\n[ 43.115229] Last user: [<ffff0000084b11b0>](acpi_os_release_object+0x28/0x38)\n[ 43.115231] 000: 74 79 00 6b 6b 6b 6b 6b 70 70 65 31 5f 74 78 5f ty.kkkkkppe1_tx_\n[ 43.115232] 010: 70 6b 74 5f 65 72 72 5f 63 73 75 6d 5f 66 61 69 pkt_err_csum_fai\n\nSigned-off-by: Timmy Li <lixiaoping3@huawei.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 32,957
|
Determine whether the code is vulnerable or not.
|
[
"void LoginUtils::DoBrowserLaunch(Profile* profile) {\n BootTimesLoader::Get()->AddLoginTimeMarker(\"BrowserLaunched\", false);\n if (!LoginUtils::Get()->IsBrowserLaunchEnabled())\n return;",
" CommandLine::ForCurrentProcess()->InitFromArgv(\n CommandLine::ForCurrentProcess()->argv());",
" VLOG(1) << \"Launching browser...\";\n BrowserInit browser_init;\n int return_code;\n browser_init.LaunchBrowser(*CommandLine::ForCurrentProcess(),\n profile,\n FilePath(),\n true,\n &return_code);\n}\n"
] |
[
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": null,
"CVE Page": null,
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/60907d63ce74cbed893473c4e9bb569f47ca0c01",
"commit_id": "60907d63ce74cbed893473c4e9bb569f47ca0c01",
"commit_message": "[cros] Pass pepper plugin flag for Guest mode quoted.\n\nThis change will only work after session_manager change is submitted:\nhttp://codereview.chromium.org/4734002\n\nBUG=chromium-os:7526\nTEST=Manual. Flash works in Guest mode.\n\nReview URL: http://codereview.chromium.org/4743001\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@65669 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,964
|
Determine whether the code is vulnerable or not.
|
[
"validGlxFBConfig(ClientPtr client, __GLXscreen *pGlxScreen, XID id,\n\t\t __GLXconfig **config, int *err)\n{\n __GLXconfig *m;",
" for (m = pGlxScreen->fbconfigs; m != NULL; m = m->next)\n\tif (m->fbconfigID == id) {\n\t *config = m;\n\t return TRUE;\n\t}",
" client->errorValue = id;\n *err = __glXError(GLXBadFBConfig);",
" return FALSE;\n}\n"
] |
[
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2010-4818",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2010-4818/",
"CWE ID": "CWE-20",
"codeLink": "https://cgit.freedesktop.org/xorg/xserver/commit?id=3f0d3f4d97bce75c1828635c322b6560a45a037f",
"commit_id": "3f0d3f4d97bce75c1828635c322b6560a45a037f",
"commit_message": null,
"lang": "C",
"project": "xserver"
}
| 32,970
|
Determine whether the code is vulnerable or not.
|
[
"static void perWorldBindingsReadonlyLongAttributeAttributeGetterCallback(v8::Local<v8::String>, const v8::PropertyCallbackInfo<v8::Value>& info)\n{\n TRACE_EVENT_SET_SAMPLING_STATE(\"Blink\", \"DOMGetter\");\n TestObjectPythonV8Internal::perWorldBindingsReadonlyLongAttributeAttributeGetter(info);\n TRACE_EVENT_SET_SAMPLING_STATE(\"V8\", \"V8Execution\");\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2014-1713",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2014-1713/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/chromium/chromium/commit/f85a87ec670ad0fce9d98d90c9a705b72a288154",
"commit_id": "f85a87ec670ad0fce9d98d90c9a705b72a288154",
"commit_message": "document.location bindings fix\n\nBUG=352374\nR=jochen@chromium.org\n\nReview URL: https://codereview.chromium.org/196343011\n\ngit-svn-id: svn://svn.chromium.org/blink/trunk@169176 bbb929c8-8fbe-4397-9dbb-9b2b20218538",
"lang": "C",
"project": "Chrome"
}
| 32,971
|
Determine whether the code is vulnerable or not.
|
[
"ChromeContentBrowserClient::ChromeContentBrowserClient() {\n for (size_t i = 0; i < arraysize(kPredefinedAllowedSocketOrigins); ++i)\n allowed_socket_origins_.insert(kPredefinedAllowedSocketOrigins[i]);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-0921",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-0921/",
"CWE ID": "CWE-264",
"codeLink": "https://github.com/chromium/chromium/commit/e9841fbdaf41b4a2baaa413f94d5c0197f9261f4",
"commit_id": "e9841fbdaf41b4a2baaa413f94d5c0197f9261f4",
"commit_message": "Ensure extensions and the Chrome Web Store are loaded in new BrowsingInstances.\n\nBUG=174943\nTEST=Can't post message to CWS. See bug for repro steps.\n\n\nReview URL: https://chromiumcodereview.appspot.com/12301013\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@184208 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 32,972
|
Determine whether the code is vulnerable or not.
|
[
"bool __sched yield_to(struct task_struct *p, bool preempt)\n{\n\tstruct task_struct *curr = current;\n\tstruct rq *rq, *p_rq;\n\tunsigned long flags;\n\tbool yielded = 0;",
"\tlocal_irq_save(flags);\n\trq = this_rq();",
"again:\n\tp_rq = task_rq(p);\n\tdouble_rq_lock(rq, p_rq);\n\twhile (task_rq(p) != p_rq) {\n\t\tdouble_rq_unlock(rq, p_rq);\n\t\tgoto again;\n\t}",
"\tif (!curr->sched_class->yield_to_task)\n\t\tgoto out;",
"\tif (curr->sched_class != p->sched_class)\n\t\tgoto out;",
"\tif (task_running(p_rq, p) || p->state)\n\t\tgoto out;",
"\tyielded = curr->sched_class->yield_to_task(rq, p, preempt);\n\tif (yielded) {\n\t\tschedstat_inc(rq, yld_count);\n\t\t/*\n\t\t * Make p's CPU reschedule; pick_next_entity takes care of\n\t\t * fairness.\n\t\t */\n\t\tif (preempt && rq != p_rq)\n\t\t\tresched_task(p_rq->curr);\n\t}",
"out:\n\tdouble_rq_unlock(rq, p_rq);\n\tlocal_irq_restore(flags);",
"\tif (yielded)\n\t\tschedule();",
"\treturn yielded;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-2918",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-2918/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/torvalds/linux/commit/a8b0ca17b80e92faab46ee7179ba9e99ccb61233",
"commit_id": "a8b0ca17b80e92faab46ee7179ba9e99ccb61233",
"commit_message": "perf: Remove the nmi parameter from the swevent and overflow interface\n\nThe nmi parameter indicated if we could do wakeups from the current\ncontext, if not, we would set some state and self-IPI and let the\nresulting interrupt do the wakeup.\n\nFor the various event classes:\n\n - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from\n the PMI-tail (ARM etc.)\n - tracepoint: nmi=0; since tracepoint could be from NMI context.\n - software: nmi=[0,1]; some, like the schedule thing cannot\n perform wakeups, and hence need 0.\n\nAs one can see, there is very little nmi=1 usage, and the down-side of\nnot using it is that on some platforms some software events can have a\njiffy delay in wakeup (when arch_irq_work_raise isn't implemented).\n\nThe up-side however is that we can remove the nmi parameter and save a\nbunch of conditionals in fast paths.\n\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Michael Cree <mcree@orcon.net.nz>\nCc: Will Deacon <will.deacon@arm.com>\nCc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>\nCc: Anton Blanchard <anton@samba.org>\nCc: Eric B Munson <emunson@mgebm.net>\nCc: Heiko Carstens <heiko.carstens@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Frederic Weisbecker <fweisbec@gmail.com>\nCc: Jason Wessel <jason.wessel@windriver.com>\nCc: Don Zickus <dzickus@redhat.com>\nLink: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org\nSigned-off-by: Ingo Molnar <mingo@elte.hu>",
"lang": "C",
"project": "linux"
}
| 32,973
|
Determine whether the code is vulnerable or not.
|
[
"int gx_device_delete_output_file(const gx_device * dev, const char *fname)\n{\n gs_parsed_file_name_t parsed;\n const char *fmt;\n char *pfname = (char *)gs_alloc_bytes(dev->memory, gp_file_name_sizeof, \"gx_device_delete_output_file(pfname)\");\n int code;",
" if (pfname == NULL) {\n code = gs_note_error(gs_error_VMerror);\n\tgoto done;\n }",
" code = gx_parse_output_file_name(&parsed, &fmt, fname, strlen(fname),\n dev->memory);\n if (code < 0) {\n goto done;\n }",
" if (parsed.iodev && !strcmp(parsed.iodev->dname, \"%stdout%\"))\n goto done;",
" if (fmt) {\t\t\t\t\t\t/* filename includes \"%nnd\" */\n long count1 = dev->PageCount + 1;",
" while (*fmt != 'l' && *fmt != '%')\n --fmt;\n if (*fmt == 'l')\n gs_sprintf(pfname, parsed.fname, count1);\n else\n gs_sprintf(pfname, parsed.fname, (int)count1);\n } else if (parsed.len && strchr(parsed.fname, '%'))\t/* filename with \"%%\" but no \"%nnd\" */\n gs_sprintf(pfname, parsed.fname);\n else\n pfname[0] = 0; /* 0 to use \"fname\", not \"pfname\" */\n if (pfname[0]) {\n parsed.fname = pfname;\n parsed.len = strlen(parsed.fname);\n }\n if (parsed.iodev)\n code = parsed.iodev->procs.delete_file((gx_io_device *)(&parsed.iodev), (const char *)parsed.fname);\n else\n code = gs_note_error(gs_error_invalidfileaccess);",
"done:\n if (pfname != NULL)\n gs_free_object(dev->memory, pfname, \"gx_device_delete_output_file(pfname)\");",
" return(code);\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-16863",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-16863/",
"CWE ID": "CWE-78",
"codeLink": "http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=79cccf641486",
"commit_id": "79cccf641486a6595c43f1de1cd7ade696020a31",
"commit_message": null,
"lang": "C",
"project": "ghostscript"
}
| 32,985
|
Determine whether the code is vulnerable or not.
|
[
"struct packet_offload *gro_find_complete_by_type(__be16 type)\n{\n\tstruct list_head *offload_head = &offload_base;\n\tstruct packet_offload *ptype;",
"\tlist_for_each_entry_rcu(ptype, offload_head, list) {\n\t\tif (ptype->type != type || !ptype->callbacks.gro_complete)\n\t\t\tcontinue;\n\t\treturn ptype;\n\t}\n\treturn NULL;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-8666",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-8666/",
"CWE ID": "CWE-400",
"codeLink": "https://github.com/torvalds/linux/commit/fac8e0f579695a3ecbc4d3cac369139d7f819971",
"commit_id": "fac8e0f579695a3ecbc4d3cac369139d7f819971",
"commit_message": "tunnels: Don't apply GRO to multiple layers of encapsulation.\n\nWhen drivers express support for TSO of encapsulated packets, they\nonly mean that they can do it for one layer of encapsulation.\nSupporting additional levels would mean updating, at a minimum,\nmore IP length fields and they are unaware of this.\n\nNo encapsulation device expresses support for handling offloaded\nencapsulated packets, so we won't generate these types of frames\nin the transmit path. However, GRO doesn't have a check for\nmultiple levels of encapsulation and will attempt to build them.\n\nUDP tunnel GRO actually does prevent this situation but it only\nhandles multiple UDP tunnels stacked on top of each other. This\ngeneralizes that solution to prevent any kind of tunnel stacking\nthat would cause problems.\n\nFixes: bf5a755f (\"net-gre-gro: Add GRE support to the GRO stack\")\nSigned-off-by: Jesse Gross <jesse@kernel.org>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 33,002
|
Determine whether the code is vulnerable or not.
|
[
"static void supplementalNodeAttrSetter(v8::Local<v8::String> name, v8::Local<v8::Value> value, const v8::AccessorInfo& info)\n{\n INC_STATS(\"DOM.TestInterface.supplementalNode._set\");\n TestInterface* imp = V8TestInterface::toNative(info.Holder());\n Node* v = V8Node::HasInstance(value) ? V8Node::toNative(v8::Handle<v8::Object>::Cast(value)) : 0;\n TestSupplemental::setSupplementalNode(imp, WTF::getPtr(v));\n return;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-3055",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-3055/",
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/e9372a1bfd3588a80fcf49aa07321f0971dd6091",
"commit_id": "e9372a1bfd3588a80fcf49aa07321f0971dd6091",
"commit_message": "[V8] Pass Isolate to throwNotEnoughArgumentsError()\nhttps://bugs.webkit.org/show_bug.cgi?id=86983\n\nReviewed by Adam Barth.\n\nThe objective is to pass Isolate around in V8 bindings.\nThis patch passes Isolate to throwNotEnoughArgumentsError().\n\nNo tests. No change in behavior.\n\n* bindings/scripts/CodeGeneratorV8.pm:\n(GenerateArgumentsCountCheck):\n(GenerateEventConstructorCallback):\n* bindings/scripts/test/V8/V8Float64Array.cpp:\n(WebCore::Float64ArrayV8Internal::fooCallback):\n* bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:\n(WebCore::TestActiveDOMObjectV8Internal::excitingFunctionCallback):\n(WebCore::TestActiveDOMObjectV8Internal::postMessageCallback):\n* bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:\n(WebCore::TestCustomNamedGetterV8Internal::anotherFunctionCallback):\n* bindings/scripts/test/V8/V8TestEventConstructor.cpp:\n(WebCore::V8TestEventConstructor::constructorCallback):\n* bindings/scripts/test/V8/V8TestEventTarget.cpp:\n(WebCore::TestEventTargetV8Internal::itemCallback):\n(WebCore::TestEventTargetV8Internal::dispatchEventCallback):\n* bindings/scripts/test/V8/V8TestInterface.cpp:\n(WebCore::TestInterfaceV8Internal::supplementalMethod2Callback):\n(WebCore::V8TestInterface::constructorCallback):\n* bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:\n(WebCore::TestMediaQueryListListenerV8Internal::methodCallback):\n* bindings/scripts/test/V8/V8TestNamedConstructor.cpp:\n(WebCore::V8TestNamedConstructorConstructorCallback):\n* bindings/scripts/test/V8/V8TestObj.cpp:\n(WebCore::TestObjV8Internal::voidMethodWithArgsCallback):\n(WebCore::TestObjV8Internal::intMethodWithArgsCallback):\n(WebCore::TestObjV8Internal::objMethodWithArgsCallback):\n(WebCore::TestObjV8Internal::methodWithSequenceArgCallback):\n(WebCore::TestObjV8Internal::methodReturningSequenceCallback):\n(WebCore::TestObjV8Internal::methodThatRequiresAllArgsAndThrowsCallback):\n(WebCore::TestObjV8Internal::serializedValueCallback):\n(WebCore::TestObjV8Internal::idbKeyCallback):\n(WebCore::TestObjV8Internal::optionsObjectCallback):\n(WebCore::TestObjV8Internal::methodWithNonOptionalArgAndOptionalArgCallback):\n(WebCore::TestObjV8Internal::methodWithNonOptionalArgAndTwoOptionalArgsCallback):\n(WebCore::TestObjV8Internal::methodWithCallbackArgCallback):\n(WebCore::TestObjV8Internal::methodWithNonCallbackArgAndCallbackArgCallback):\n(WebCore::TestObjV8Internal::overloadedMethod1Callback):\n(WebCore::TestObjV8Internal::overloadedMethod2Callback):\n(WebCore::TestObjV8Internal::overloadedMethod3Callback):\n(WebCore::TestObjV8Internal::overloadedMethod4Callback):\n(WebCore::TestObjV8Internal::overloadedMethod5Callback):\n(WebCore::TestObjV8Internal::overloadedMethod6Callback):\n(WebCore::TestObjV8Internal::overloadedMethod7Callback):\n(WebCore::TestObjV8Internal::overloadedMethod11Callback):\n(WebCore::TestObjV8Internal::overloadedMethod12Callback):\n(WebCore::TestObjV8Internal::enabledAtRuntimeMethod1Callback):\n(WebCore::TestObjV8Internal::enabledAtRuntimeMethod2Callback):\n(WebCore::TestObjV8Internal::convert1Callback):\n(WebCore::TestObjV8Internal::convert2Callback):\n(WebCore::TestObjV8Internal::convert3Callback):\n(WebCore::TestObjV8Internal::convert4Callback):\n(WebCore::TestObjV8Internal::convert5Callback):\n(WebCore::TestObjV8Internal::strictFunctionCallback):\n(WebCore::V8TestObj::constructorCallback):\n* bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:\n(WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):\n(WebCore::V8TestSerializedScriptValueInterface::constructorCallback):\n* bindings/v8/ScriptController.cpp:\n(WebCore::setValueAndClosePopupCallback):\n* bindings/v8/V8Proxy.cpp:\n(WebCore::V8Proxy::throwNotEnoughArgumentsError):\n* bindings/v8/V8Proxy.h:\n(V8Proxy):\n* bindings/v8/custom/V8AudioContextCustom.cpp:\n(WebCore::V8AudioContext::constructorCallback):\n* bindings/v8/custom/V8DataViewCustom.cpp:\n(WebCore::V8DataView::getInt8Callback):\n(WebCore::V8DataView::getUint8Callback):\n(WebCore::V8DataView::setInt8Callback):\n(WebCore::V8DataView::setUint8Callback):\n* bindings/v8/custom/V8DirectoryEntryCustom.cpp:\n(WebCore::V8DirectoryEntry::getDirectoryCallback):\n(WebCore::V8DirectoryEntry::getFileCallback):\n* bindings/v8/custom/V8IntentConstructor.cpp:\n(WebCore::V8Intent::constructorCallback):\n* bindings/v8/custom/V8SVGLengthCustom.cpp:\n(WebCore::V8SVGLength::convertToSpecifiedUnitsCallback):\n* bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:\n(WebCore::getObjectParameter):\n(WebCore::V8WebGLRenderingContext::getAttachedShadersCallback):\n(WebCore::V8WebGLRenderingContext::getExtensionCallback):\n(WebCore::V8WebGLRenderingContext::getFramebufferAttachmentParameterCallback):\n(WebCore::V8WebGLRenderingContext::getParameterCallback):\n(WebCore::V8WebGLRenderingContext::getProgramParameterCallback):\n(WebCore::V8WebGLRenderingContext::getShaderParameterCallback):\n(WebCore::V8WebGLRenderingContext::getUniformCallback):\n(WebCore::vertexAttribAndUniformHelperf):\n(WebCore::uniformHelperi):\n(WebCore::uniformMatrixHelper):\n* bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:\n(WebCore::V8WebKitMutationObserver::constructorCallback):\n(WebCore::V8WebKitMutationObserver::observeCallback):\n* bindings/v8/custom/V8WebSocketCustom.cpp:\n(WebCore::V8WebSocket::constructorCallback):\n(WebCore::V8WebSocket::sendCallback):\n* bindings/v8/custom/V8XMLHttpRequestCustom.cpp:\n(WebCore::V8XMLHttpRequest::openCallback):\n\n\ngit-svn-id: svn://svn.chromium.org/blink/trunk@117736 bbb929c8-8fbe-4397-9dbb-9b2b20218538",
"lang": "C",
"project": "Chrome"
}
| 33,003
|
Determine whether the code is vulnerable or not.
|
[
"static int __packet_snd_vnet_parse(struct virtio_net_hdr *vnet_hdr, size_t len)\n{\n\tif ((vnet_hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) &&\n\t (__virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) +\n\t __virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2 >\n\t __virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len)))\n\t\tvnet_hdr->hdr_len = __cpu_to_virtio16(vio_le(),\n\t\t\t __virtio16_to_cpu(vio_le(), vnet_hdr->csum_start) +\n\t\t\t__virtio16_to_cpu(vio_le(), vnet_hdr->csum_offset) + 2);",
"\tif (__virtio16_to_cpu(vio_le(), vnet_hdr->hdr_len) > len)\n\t\treturn -EINVAL;",
"\treturn 0;\n}\n"
] |
[
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-15649",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-15649/",
"CWE ID": "CWE-362",
"codeLink": "https://github.com/torvalds/linux/commit/4971613c1639d8e5f102c4e797c3bf8f83a5a69e",
"commit_id": "4971613c1639d8e5f102c4e797c3bf8f83a5a69e",
"commit_message": "packet: in packet_do_bind, test fanout with bind_lock held\n\nOnce a socket has po->fanout set, it remains a member of the group\nuntil it is destroyed. The prot_hook must be constant and identical\nacross sockets in the group.\n\nIf fanout_add races with packet_do_bind between the test of po->fanout\nand taking the lock, the bind call may make type or dev inconsistent\nwith that of the fanout group.\n\nHold po->bind_lock when testing po->fanout to avoid this race.\n\nI had to introduce artificial delay (local_bh_enable) to actually\nobserve the race.\n\nFixes: dc99f600698d (\"packet: Add fanout support.\")\nSigned-off-by: Willem de Bruijn <willemb@google.com>\nReviewed-by: Eric Dumazet <edumazet@google.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 33,004
|
Determine whether the code is vulnerable or not.
|
[
"int sock_i_uid(struct sock *sk)\n{\n\tint uid;",
"\tread_lock_bh(&sk->sk_callback_lock);\n\tuid = sk->sk_socket ? SOCK_INODE(sk->sk_socket)->i_uid : 0;\n\tread_unlock_bh(&sk->sk_callback_lock);\n\treturn uid;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2012-2136",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2012-2136/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/torvalds/linux/commit/cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc",
"commit_id": "cc9b17ad29ecaa20bfe426a8d4dbfb94b13ff1cc",
"commit_message": "net: sock: validate data_len before allocating skb in sock_alloc_send_pskb()\n\nWe need to validate the number of pages consumed by data_len, otherwise frags\narray could be overflowed by userspace. So this patch validate data_len and\nreturn -EMSGSIZE when data_len may occupies more frags than MAX_SKB_FRAGS.\n\nSigned-off-by: Jason Wang <jasowang@redhat.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 33,006
|
Determine whether the code is vulnerable or not.
|
[
"inline bool xs_has_arg(int argc, char *argv[])\n{\n\treturn optind < argc &&\n\t argv[optind][0] != '-' &&\n\t argv[optind][0] != '!';\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2019-11360",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2019-11360/",
"CWE ID": "CWE-119",
"codeLink": "https://git.netfilter.org/iptables/commit/iptables/xshared.c?id=2ae1099a42e6a0f06de305ca13a842ac83d4683e",
"commit_id": "2ae1099a42e6a0f06de305ca13a842ac83d4683e",
"commit_message": null,
"lang": "C",
"project": "netfilter"
}
| 33,010
|
Determine whether the code is vulnerable or not.
|
[
"static struct perf_callchain_entry *get_callchain_entry(int *rctx)\n{\n\tint cpu;\n\tstruct callchain_cpus_entries *entries;",
"\t*rctx = get_recursion_context(__get_cpu_var(callchain_recursion));\n\tif (*rctx == -1)\n\t\treturn NULL;",
"\tentries = rcu_dereference(callchain_cpus_entries);\n\tif (!entries)\n\t\treturn NULL;",
"\tcpu = smp_processor_id();",
"\treturn &entries->cpu_entries[cpu][*rctx];\n}\n"
] |
[
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-2918",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-2918/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/torvalds/linux/commit/a8b0ca17b80e92faab46ee7179ba9e99ccb61233",
"commit_id": "a8b0ca17b80e92faab46ee7179ba9e99ccb61233",
"commit_message": "perf: Remove the nmi parameter from the swevent and overflow interface\n\nThe nmi parameter indicated if we could do wakeups from the current\ncontext, if not, we would set some state and self-IPI and let the\nresulting interrupt do the wakeup.\n\nFor the various event classes:\n\n - hardware: nmi=0; PMI is in fact an NMI or we run irq_work_run from\n the PMI-tail (ARM etc.)\n - tracepoint: nmi=0; since tracepoint could be from NMI context.\n - software: nmi=[0,1]; some, like the schedule thing cannot\n perform wakeups, and hence need 0.\n\nAs one can see, there is very little nmi=1 usage, and the down-side of\nnot using it is that on some platforms some software events can have a\njiffy delay in wakeup (when arch_irq_work_raise isn't implemented).\n\nThe up-side however is that we can remove the nmi parameter and save a\nbunch of conditionals in fast paths.\n\nSigned-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>\nCc: Michael Cree <mcree@orcon.net.nz>\nCc: Will Deacon <will.deacon@arm.com>\nCc: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>\nCc: Anton Blanchard <anton@samba.org>\nCc: Eric B Munson <emunson@mgebm.net>\nCc: Heiko Carstens <heiko.carstens@de.ibm.com>\nCc: Paul Mundt <lethal@linux-sh.org>\nCc: David S. Miller <davem@davemloft.net>\nCc: Frederic Weisbecker <fweisbec@gmail.com>\nCc: Jason Wessel <jason.wessel@windriver.com>\nCc: Don Zickus <dzickus@redhat.com>\nLink: http://lkml.kernel.org/n/tip-agjev8eu666tvknpb3iaj0fg@git.kernel.org\nSigned-off-by: Ingo Molnar <mingo@elte.hu>",
"lang": "C",
"project": "linux"
}
| 33,015
|
Determine whether the code is vulnerable or not.
|
[
"ExtensionNavigationThrottle::WillRedirectRequest() {\n ThrottleCheckResult result = WillStartOrRedirectRequest();\n if (result.action() == BLOCK_REQUEST) {\n return CANCEL;\n }\n return result;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-6121",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-6121/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/chromium/chromium/commit/7614790c80996d32a28218f4d1605b0908e9ddf6",
"commit_id": "7614790c80996d32a28218f4d1605b0908e9ddf6",
"commit_message": "Apply ExtensionNavigationThrottle filesystem/blob checks to all frames.\n\nBUG=836858\n\nChange-Id: I34333a72501129fd40b5a9aa6378c9f35f1e7fc2\nReviewed-on: https://chromium-review.googlesource.com/1028511\nReviewed-by: Devlin <rdevlin.cronin@chromium.org>\nReviewed-by: Alex Moshchuk <alexmos@chromium.org>\nReviewed-by: Nick Carter <nick@chromium.org>\nCommit-Queue: Charlie Reis <creis@chromium.org>\nCr-Commit-Position: refs/heads/master@{#553867}",
"lang": "C",
"project": "Chrome"
}
| 33,016
|
Determine whether the code is vulnerable or not.
|
[
"static void vmx_enable_intercept_msr_read_x2apic(u32 msr)\n{\n\t__vmx_enable_intercept_for_msr(vmx_msr_bitmap_legacy_x2apic,\n\t\t\tmsr, MSR_TYPE_R);\n\t__vmx_enable_intercept_for_msr(vmx_msr_bitmap_longmode_x2apic,\n\t\t\tmsr, MSR_TYPE_R);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2014-3690",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2014-3690/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/torvalds/linux/commit/d974baa398f34393db76be45f7d4d04fbdbb4a0a",
"commit_id": "d974baa398f34393db76be45f7d4d04fbdbb4a0a",
"commit_message": "x86,kvm,vmx: Preserve CR4 across VM entry\n\nCR4 isn't constant; at least the TSD and PCE bits can vary.\n\nTBH, treating CR0 and CR3 as constant scares me a bit, too, but it looks\nlike it's correct.\n\nThis adds a branch and a read from cr4 to each vm entry. Because it is\nextremely likely that consecutive entries into the same vcpu will have\nthe same host cr4 value, this fixes up the vmcs instead of restoring cr4\nafter the fact. A subsequent patch will add a kernel-wide cr4 shadow,\nreducing the overhead in the common case to just two memory reads and a\nbranch.\n\nSigned-off-by: Andy Lutomirski <luto@amacapital.net>\nAcked-by: Paolo Bonzini <pbonzini@redhat.com>\nCc: stable@vger.kernel.org\nCc: Petr Matousek <pmatouse@redhat.com>\nCc: Gleb Natapov <gleb@kernel.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>",
"lang": "C",
"project": "linux"
}
| 33,020
|
Determine whether the code is vulnerable or not.
|
[
"static void print_ucode(struct ucode_cpu_info *uci)\n{\n\tstruct microcode_intel *mc_intel;\n\tint *delay_ucode_info_p;\n\tint *current_mc_date_p;",
"\tmc_intel = uci->mc;\n\tif (mc_intel == NULL)\n\t\treturn;",
"\tdelay_ucode_info_p = (int *)__pa_nodebug(&delay_ucode_info);\n\tcurrent_mc_date_p = (int *)__pa_nodebug(¤t_mc_date);",
"\t*delay_ucode_info_p = 1;\n\t*current_mc_date_p = mc_intel->hdr.date;\n}\n"
] |
[
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-2666",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-2666/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/torvalds/linux/commit/f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4",
"commit_id": "f84598bd7c851f8b0bf8cd0d7c3be0d73c432ff4",
"commit_message": "x86/microcode/intel: Guard against stack overflow in the loader\n\nmc_saved_tmp is a static array allocated on the stack, we need to make\nsure mc_saved_count stays within its bounds, otherwise we're overflowing\nthe stack in _save_mc(). A specially crafted microcode header could lead\nto a kernel crash or potentially kernel execution.\n\nSigned-off-by: Quentin Casasnovas <quentin.casasnovas@oracle.com>\nCc: \"H. Peter Anvin\" <hpa@zytor.com>\nCc: Fenghua Yu <fenghua.yu@intel.com>\nLink: http://lkml.kernel.org/r/1422964824-22056-1-git-send-email-quentin.casasnovas@oracle.com\nSigned-off-by: Borislav Petkov <bp@suse.de>",
"lang": "C",
"project": "linux"
}
| 33,021
|
Determine whether the code is vulnerable or not.
|
[
"mainloop_clear_child_userdata(mainloop_child_t *child)\n{\n child->privatedata = NULL;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-0281",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-0281/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/ClusterLabs/pacemaker/commit/564f7cc2a51dcd2f28ab12a13394f31be5aa3c93",
"commit_id": "564f7cc2a51dcd2f28ab12a13394f31be5aa3c93",
"commit_message": "High: core: Internal tls api improvements for reuse with future LRMD tls backend.",
"lang": "C",
"project": "pacemaker"
}
| 33,022
|
Determine whether the code is vulnerable or not.
|
[
"static int ext4_check_descriptors(struct super_block *sb,\n\t\t\t\t ext4_group_t *first_not_zeroed)\n{\n\tstruct ext4_sb_info *sbi = EXT4_SB(sb);\n\text4_fsblk_t first_block = le32_to_cpu(sbi->s_es->s_first_data_block);\n\text4_fsblk_t last_block;\n\text4_fsblk_t block_bitmap;\n\text4_fsblk_t inode_bitmap;\n\text4_fsblk_t inode_table;\n\tint flexbg_flag = 0;\n\text4_group_t i, grp = sbi->s_groups_count;",
"\tif (EXT4_HAS_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_FLEX_BG))\n\t\tflexbg_flag = 1;",
"\text4_debug(\"Checking group descriptors\");",
"\tfor (i = 0; i < sbi->s_groups_count; i++) {\n\t\tstruct ext4_group_desc *gdp = ext4_get_group_desc(sb, i, NULL);",
"\t\tif (i == sbi->s_groups_count - 1 || flexbg_flag)\n\t\t\tlast_block = ext4_blocks_count(sbi->s_es) - 1;\n\t\telse\n\t\t\tlast_block = first_block +\n\t\t\t\t(EXT4_BLOCKS_PER_GROUP(sb) - 1);",
"\t\tif ((grp == sbi->s_groups_count) &&\n\t\t !(gdp->bg_flags & cpu_to_le16(EXT4_BG_INODE_ZEROED)))\n\t\t\tgrp = i;",
"\t\tblock_bitmap = ext4_block_bitmap(sb, gdp);\n\t\tif (block_bitmap < first_block || block_bitmap > last_block) {\n\t\t\text4_msg(sb, KERN_ERR, \"ext4_check_descriptors: \"\n\t\t\t \"Block bitmap for group %u not in group \"\n\t\t\t \"(block %llu)!\", i, block_bitmap);\n\t\t\treturn 0;\n\t\t}\n\t\tinode_bitmap = ext4_inode_bitmap(sb, gdp);\n\t\tif (inode_bitmap < first_block || inode_bitmap > last_block) {\n\t\t\text4_msg(sb, KERN_ERR, \"ext4_check_descriptors: \"\n\t\t\t \"Inode bitmap for group %u not in group \"\n\t\t\t \"(block %llu)!\", i, inode_bitmap);\n\t\t\treturn 0;\n\t\t}\n\t\tinode_table = ext4_inode_table(sb, gdp);\n\t\tif (inode_table < first_block ||\n\t\t inode_table + sbi->s_itb_per_group - 1 > last_block) {\n\t\t\text4_msg(sb, KERN_ERR, \"ext4_check_descriptors: \"\n\t\t\t \"Inode table for group %u not in group \"\n\t\t\t \"(block %llu)!\", i, inode_table);\n\t\t\treturn 0;\n\t\t}\n\t\text4_lock_group(sb, i);\n\t\tif (!ext4_group_desc_csum_verify(sbi, i, gdp)) {\n\t\t\text4_msg(sb, KERN_ERR, \"ext4_check_descriptors: \"\n\t\t\t\t \"Checksum for group %u failed (%u!=%u)\",\n\t\t\t\t i, le16_to_cpu(ext4_group_desc_csum(sbi, i,\n\t\t\t\t gdp)), le16_to_cpu(gdp->bg_checksum));\n\t\t\tif (!(sb->s_flags & MS_RDONLY)) {\n\t\t\t\text4_unlock_group(sb, i);\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\text4_unlock_group(sb, i);\n\t\tif (!flexbg_flag)\n\t\t\tfirst_block += EXT4_BLOCKS_PER_GROUP(sb);\n\t}\n\tif (NULL != first_not_zeroed)\n\t\t*first_not_zeroed = grp;",
"\text4_free_blocks_count_set(sbi->s_es, ext4_count_free_blocks(sb));\n\tsbi->s_es->s_free_inodes_count =cpu_to_le32(ext4_count_free_inodes(sb));\n\treturn 1;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-2493",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-2493/",
"CWE ID": null,
"codeLink": "https://github.com/torvalds/linux/commit/0449641130f5652b344ef6fa39fa019d7e94660a",
"commit_id": "0449641130f5652b344ef6fa39fa019d7e94660a",
"commit_message": "ext4: init timer earlier to avoid a kernel panic in __save_error_info\n\nDuring mount, when we fail to open journal inode or root inode, the\n__save_error_info will mod_timer. But actually s_err_report isn't\ninitialized yet and the kernel oops. The detailed information can\nbe found https://bugzilla.kernel.org/show_bug.cgi?id=32082.\n\nThe best way is to check whether the timer s_err_report is initialized\nor not. But it seems that in include/linux/timer.h, we can't find a\ngood function to check the status of this timer, so this patch just\nmove the initializtion of s_err_report earlier so that we can avoid\nthe kernel panic. The corresponding del_timer is also added in the\nerror path.\n\nReported-by: Sami Liedes <sliedes@cc.hut.fi>\nSigned-off-by: Tao Ma <boyu.mt@taobao.com>\nSigned-off-by: \"Theodore Ts'o\" <tytso@mit.edu>",
"lang": "C",
"project": "linux"
}
| 33,030
|
Determine whether the code is vulnerable or not.
|
[
"int register_pernet_subsys(struct pernet_operations *ops)\n{\n\tint error;\n\tdown_write(&pernet_ops_rwsem);\n\terror = register_pernet_operations(first_device, ops);\n\tup_write(&pernet_ops_rwsem);\n\treturn error;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2019-10639",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2019-10639/",
"CWE ID": "CWE-200",
"codeLink": "https://github.com/torvalds/linux/commit/355b98553789b646ed97ad801a619ff898471b92",
"commit_id": "355b98553789b646ed97ad801a619ff898471b92",
"commit_message": "netns: provide pure entropy for net_hash_mix()\n\nnet_hash_mix() currently uses kernel address of a struct net,\nand is used in many places that could be used to reveal this\naddress to a patient attacker, thus defeating KASLR, for\nthe typical case (initial net namespace, &init_net is\nnot dynamically allocated)\n\nI believe the original implementation tried to avoid spending\ntoo many cycles in this function, but security comes first.\n\nAlso provide entropy regardless of CONFIG_NET_NS.\n\nFixes: 0b4419162aa6 (\"netns: introduce the net_hash_mix \"salt\" for hashes\")\nSigned-off-by: Eric Dumazet <edumazet@google.com>\nReported-by: Amit Klein <aksecurity@gmail.com>\nReported-by: Benny Pinkas <benny@pinkas.net>\nCc: Pavel Emelyanov <xemul@openvz.org>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 33,036
|
Determine whether the code is vulnerable or not.
|
[
"bool AXObject::isARIAControl(AccessibilityRole ariaRole) {\n return isARIAInput(ariaRole) || ariaRole == ButtonRole ||\n ariaRole == ComboBoxRole || ariaRole == SliderRole;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-1274",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-1274/",
"CWE ID": "CWE-254",
"codeLink": "https://github.com/chromium/chromium/commit/d27468a832d5316884bd02f459cbf493697fd7e1",
"commit_id": "d27468a832d5316884bd02f459cbf493697fd7e1",
"commit_message": "Switch to equalIgnoringASCIICase throughout modules/accessibility\n\nBUG=627682\n\nReview-Url: https://codereview.chromium.org/2793913007\nCr-Commit-Position: refs/heads/master@{#461858}",
"lang": "C",
"project": "Chrome"
}
| 33,039
|
Determine whether the code is vulnerable or not.
|
[
"_dbus_geteuid (void)\n{\n return geteuid ();\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-2168",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-2168/",
"CWE ID": "CWE-20",
"codeLink": "https://cgit.freedesktop.org/dbus/dbus/commit/?id=954d75b2b64e4799f360d2a6bf9cff6d9fee37e7",
"commit_id": "954d75b2b64e4799f360d2a6bf9cff6d9fee37e7",
"commit_message": null,
"lang": "C",
"project": "dbus"
}
| 33,045
|
Determine whether the code is vulnerable or not.
|
[
"const CustomButton* CustomButton::AsCustomButton(const views::View* view) {\n return AsCustomButton(const_cast<views::View*>(view));\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-1616",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-1616/",
"CWE ID": "CWE-254",
"codeLink": "https://github.com/chromium/chromium/commit/297ae873b471a46929ea39697b121c0b411434ee",
"commit_id": "297ae873b471a46929ea39697b121c0b411434ee",
"commit_message": "Custom buttons should only handle accelerators when focused.\n\nBUG=541415\n\nReview URL: https://codereview.chromium.org/1437523005\n\nCr-Commit-Position: refs/heads/master@{#360130}",
"lang": "C",
"project": "Chrome"
}
| 13,218
|
Determine whether the code is vulnerable or not.
|
[
"static struct sctp_association *sctp_association_init(struct sctp_association *asoc,\n\t\t\t\t\t const struct sctp_endpoint *ep,\n\t\t\t\t\t const struct sock *sk,\n\t\t\t\t\t sctp_scope_t scope,\n\t\t\t\t\t gfp_t gfp)\n{\n\tstruct net *net = sock_net(sk);\n\tstruct sctp_sock *sp;\n\tint i;\n\tsctp_paramhdr_t *p;\n\tint err;",
"\t/* Retrieve the SCTP per socket area. */\n\tsp = sctp_sk((struct sock *)sk);",
"\t/* Discarding const is appropriate here. */\n\tasoc->ep = (struct sctp_endpoint *)ep;\n\tasoc->base.sk = (struct sock *)sk;",
"\tsctp_endpoint_hold(asoc->ep);\n\tsock_hold(asoc->base.sk);",
"\t/* Initialize the common base substructure. */\n\tasoc->base.type = SCTP_EP_TYPE_ASSOCIATION;",
"\t/* Initialize the object handling fields. */\n\tatomic_set(&asoc->base.refcnt, 1);",
"\t/* Initialize the bind addr area. */\n\tsctp_bind_addr_init(&asoc->base.bind_addr, ep->base.bind_addr.port);",
"\tasoc->state = SCTP_STATE_CLOSED;\n\tasoc->cookie_life = ms_to_ktime(sp->assocparams.sasoc_cookie_life);\n\tasoc->user_frag = sp->user_frag;",
"\t/* Set the association max_retrans and RTO values from the\n\t * socket values.\n\t */\n\tasoc->max_retrans = sp->assocparams.sasoc_asocmaxrxt;\n\tasoc->pf_retrans = net->sctp.pf_retrans;",
"\tasoc->rto_initial = msecs_to_jiffies(sp->rtoinfo.srto_initial);\n\tasoc->rto_max = msecs_to_jiffies(sp->rtoinfo.srto_max);\n\tasoc->rto_min = msecs_to_jiffies(sp->rtoinfo.srto_min);",
"\t/* Initialize the association's heartbeat interval based on the\n\t * sock configured value.\n\t */\n\tasoc->hbinterval = msecs_to_jiffies(sp->hbinterval);",
"\t/* Initialize path max retrans value. */\n\tasoc->pathmaxrxt = sp->pathmaxrxt;",
"\t/* Initialize default path MTU. */\n\tasoc->pathmtu = sp->pathmtu;",
"\t/* Set association default SACK delay */\n\tasoc->sackdelay = msecs_to_jiffies(sp->sackdelay);\n\tasoc->sackfreq = sp->sackfreq;",
"\t/* Set the association default flags controlling\n\t * Heartbeat, SACK delay, and Path MTU Discovery.\n\t */\n\tasoc->param_flags = sp->param_flags;",
"\t/* Initialize the maximum number of new data packets that can be sent\n\t * in a burst.\n\t */\n\tasoc->max_burst = sp->max_burst;",
"\t/* initialize association timers */\n\tasoc->timeouts[SCTP_EVENT_TIMEOUT_T1_COOKIE] = asoc->rto_initial;\n\tasoc->timeouts[SCTP_EVENT_TIMEOUT_T1_INIT] = asoc->rto_initial;\n\tasoc->timeouts[SCTP_EVENT_TIMEOUT_T2_SHUTDOWN] = asoc->rto_initial;",
"\t/* sctpimpguide Section 2.12.2\n\t * If the 'T5-shutdown-guard' timer is used, it SHOULD be set to the\n\t * recommended value of 5 times 'RTO.Max'.\n\t */\n\tasoc->timeouts[SCTP_EVENT_TIMEOUT_T5_SHUTDOWN_GUARD]\n\t\t= 5 * asoc->rto_max;",
"\tasoc->timeouts[SCTP_EVENT_TIMEOUT_SACK] = asoc->sackdelay;\n\tasoc->timeouts[SCTP_EVENT_TIMEOUT_AUTOCLOSE] = sp->autoclose * HZ;",
"\t/* Initializes the timers */\n\tfor (i = SCTP_EVENT_TIMEOUT_NONE; i < SCTP_NUM_TIMEOUT_TYPES; ++i)\n\t\tsetup_timer(&asoc->timers[i], sctp_timer_events[i],\n\t\t\t\t(unsigned long)asoc);",
"\t/* Pull default initialization values from the sock options.\n\t * Note: This assumes that the values have already been\n\t * validated in the sock.\n\t */\n\tasoc->c.sinit_max_instreams = sp->initmsg.sinit_max_instreams;\n\tasoc->c.sinit_num_ostreams = sp->initmsg.sinit_num_ostreams;\n\tasoc->max_init_attempts\t= sp->initmsg.sinit_max_attempts;",
"\tasoc->max_init_timeo =\n\t\t msecs_to_jiffies(sp->initmsg.sinit_max_init_timeo);",
"\t/* Set the local window size for receive.\n\t * This is also the rcvbuf space per association.\n\t * RFC 6 - A SCTP receiver MUST be able to receive a minimum of\n\t * 1500 bytes in one SCTP packet.\n\t */\n\tif ((sk->sk_rcvbuf/2) < SCTP_DEFAULT_MINWINDOW)\n\t\tasoc->rwnd = SCTP_DEFAULT_MINWINDOW;\n\telse\n\t\tasoc->rwnd = sk->sk_rcvbuf/2;",
"\tasoc->a_rwnd = asoc->rwnd;",
"\t/* Use my own max window until I learn something better. */\n\tasoc->peer.rwnd = SCTP_DEFAULT_MAXWINDOW;",
"\t/* Initialize the receive memory counter */\n\tatomic_set(&asoc->rmem_alloc, 0);",
"\tinit_waitqueue_head(&asoc->wait);",
"\tasoc->c.my_vtag = sctp_generate_tag(ep);\n\tasoc->c.my_port = ep->base.bind_addr.port;",
"\tasoc->c.initial_tsn = sctp_generate_tsn(ep);",
"\tasoc->next_tsn = asoc->c.initial_tsn;",
"\tasoc->ctsn_ack_point = asoc->next_tsn - 1;\n\tasoc->adv_peer_ack_point = asoc->ctsn_ack_point;\n\tasoc->highest_sacked = asoc->ctsn_ack_point;\n\tasoc->last_cwr_tsn = asoc->ctsn_ack_point;",
"\t/* ADDIP Section 4.1 Asconf Chunk Procedures\n\t *\n\t * When an endpoint has an ASCONF signaled change to be sent to the\n\t * remote endpoint it should do the following:\n\t * ...\n\t * A2) a serial number should be assigned to the chunk. The serial\n\t * number SHOULD be a monotonically increasing number. The serial\n\t * numbers SHOULD be initialized at the start of the\n\t * association to the same value as the initial TSN.\n\t */\n\tasoc->addip_serial = asoc->c.initial_tsn;",
"\tINIT_LIST_HEAD(&asoc->addip_chunk_list);\n\tINIT_LIST_HEAD(&asoc->asconf_ack_list);",
"\t/* Make an empty list of remote transport addresses. */\n\tINIT_LIST_HEAD(&asoc->peer.transport_addr_list);",
"\t/* RFC 2960 5.1 Normal Establishment of an Association\n\t *\n\t * After the reception of the first data chunk in an\n\t * association the endpoint must immediately respond with a\n\t * sack to acknowledge the data chunk. Subsequent\n\t * acknowledgements should be done as described in Section\n\t * 6.2.\n\t *\n\t * [We implement this by telling a new association that it\n\t * already received one packet.]\n\t */\n\tasoc->peer.sack_needed = 1;\n\tasoc->peer.sack_generation = 1;",
"\t/* Assume that the peer will tell us if he recognizes ASCONF\n\t * as part of INIT exchange.\n\t * The sctp_addip_noauth option is there for backward compatibility\n\t * and will revert old behavior.\n\t */\n\tif (net->sctp.addip_noauth)\n\t\tasoc->peer.asconf_capable = 1;",
"\t/* Create an input queue. */\n\tsctp_inq_init(&asoc->base.inqueue);\n\tsctp_inq_set_th_handler(&asoc->base.inqueue, sctp_assoc_bh_rcv);",
"\t/* Create an output queue. */\n\tsctp_outq_init(asoc, &asoc->outqueue);",
"\tif (!sctp_ulpq_init(&asoc->ulpq, asoc))\n\t\tgoto fail_init;",
"\t/* Assume that peer would support both address types unless we are\n\t * told otherwise.\n\t */\n\tasoc->peer.ipv4_address = 1;\n\tif (asoc->base.sk->sk_family == PF_INET6)\n\t\tasoc->peer.ipv6_address = 1;\n\tINIT_LIST_HEAD(&asoc->asocs);",
"\tasoc->default_stream = sp->default_stream;\n\tasoc->default_ppid = sp->default_ppid;\n\tasoc->default_flags = sp->default_flags;\n\tasoc->default_context = sp->default_context;\n\tasoc->default_timetolive = sp->default_timetolive;\n\tasoc->default_rcv_context = sp->default_rcv_context;",
"\t/* AUTH related initializations */\n\tINIT_LIST_HEAD(&asoc->endpoint_shared_keys);\n\terr = sctp_auth_asoc_copy_shkeys(ep, asoc, gfp);\n\tif (err)\n\t\tgoto fail_init;",
"\tasoc->active_key_id = ep->active_key_id;",
"\t/* Save the hmacs and chunks list into this association */\n\tif (ep->auth_hmacs_list)\n\t\tmemcpy(asoc->c.auth_hmacs, ep->auth_hmacs_list,\n\t\t\tntohs(ep->auth_hmacs_list->param_hdr.length));\n\tif (ep->auth_chunk_list)\n\t\tmemcpy(asoc->c.auth_chunks, ep->auth_chunk_list,\n\t\t\tntohs(ep->auth_chunk_list->param_hdr.length));",
"\t/* Get the AUTH random number for this association */\n\tp = (sctp_paramhdr_t *)asoc->c.auth_random;\n\tp->type = SCTP_PARAM_RANDOM;\n\tp->length = htons(sizeof(sctp_paramhdr_t) + SCTP_AUTH_RANDOM_LENGTH);\n\tget_random_bytes(p+1, SCTP_AUTH_RANDOM_LENGTH);",
"\treturn asoc;",
"fail_init:\n\tsock_put(asoc->base.sk);\n\tsctp_endpoint_put(asoc->ep);\n\treturn NULL;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2014-5077",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2014-5077/",
"CWE ID": null,
"codeLink": "https://github.com/torvalds/linux/commit/1be9a950c646c9092fb3618197f7b6bfb50e82aa",
"commit_id": "1be9a950c646c9092fb3618197f7b6bfb50e82aa",
"commit_message": "net: sctp: inherit auth_capable on INIT collisions\n\nJason reported an oops caused by SCTP on his ARM machine with\nSCTP authentication enabled:\n\nInternal error: Oops: 17 [#1] ARM\nCPU: 0 PID: 104 Comm: sctp-test Not tainted 3.13.0-68744-g3632f30c9b20-dirty #1\ntask: c6eefa40 ti: c6f52000 task.ti: c6f52000\nPC is at sctp_auth_calculate_hmac+0xc4/0x10c\nLR is at sg_init_table+0x20/0x38\npc : [<c024bb80>] lr : [<c00f32dc>] psr: 40000013\nsp : c6f538e8 ip : 00000000 fp : c6f53924\nr10: c6f50d80 r9 : 00000000 r8 : 00010000\nr7 : 00000000 r6 : c7be4000 r5 : 00000000 r4 : c6f56254\nr3 : c00c8170 r2 : 00000001 r1 : 00000008 r0 : c6f1e660\nFlags: nZcv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user\nControl: 0005397f Table: 06f28000 DAC: 00000015\nProcess sctp-test (pid: 104, stack limit = 0xc6f521c0)\nStack: (0xc6f538e8 to 0xc6f54000)\n[...]\nBacktrace:\n[<c024babc>] (sctp_auth_calculate_hmac+0x0/0x10c) from [<c0249af8>] (sctp_packet_transmit+0x33c/0x5c8)\n[<c02497bc>] (sctp_packet_transmit+0x0/0x5c8) from [<c023e96c>] (sctp_outq_flush+0x7fc/0x844)\n[<c023e170>] (sctp_outq_flush+0x0/0x844) from [<c023ef78>] (sctp_outq_uncork+0x24/0x28)\n[<c023ef54>] (sctp_outq_uncork+0x0/0x28) from [<c0234364>] (sctp_side_effects+0x1134/0x1220)\n[<c0233230>] (sctp_side_effects+0x0/0x1220) from [<c02330b0>] (sctp_do_sm+0xac/0xd4)\n[<c0233004>] (sctp_do_sm+0x0/0xd4) from [<c023675c>] (sctp_assoc_bh_rcv+0x118/0x160)\n[<c0236644>] (sctp_assoc_bh_rcv+0x0/0x160) from [<c023d5bc>] (sctp_inq_push+0x6c/0x74)\n[<c023d550>] (sctp_inq_push+0x0/0x74) from [<c024a6b0>] (sctp_rcv+0x7d8/0x888)\n\nWhile we already had various kind of bugs in that area\nec0223ec48a9 (\"net: sctp: fix sctp_sf_do_5_1D_ce to verify if\nwe/peer is AUTH capable\") and b14878ccb7fa (\"net: sctp: cache\nauth_enable per endpoint\"), this one is a bit of a different\nkind.\n\nGiving a bit more background on why SCTP authentication is\nneeded can be found in RFC4895:\n\n SCTP uses 32-bit verification tags to protect itself against\n blind attackers. These values are not changed during the\n lifetime of an SCTP association.\n\n Looking at new SCTP extensions, there is the need to have a\n method of proving that an SCTP chunk(s) was really sent by\n the original peer that started the association and not by a\n malicious attacker.\n\nTo cause this bug, we're triggering an INIT collision between\npeers; normal SCTP handshake where both sides intent to\nauthenticate packets contains RANDOM; CHUNKS; HMAC-ALGO\nparameters that are being negotiated among peers:\n\n ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ---------->\n <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---------\n -------------------- COOKIE-ECHO -------------------->\n <-------------------- COOKIE-ACK ---------------------\n\nRFC4895 says that each endpoint therefore knows its own random\nnumber and the peer's random number *after* the association\nhas been established. The local and peer's random number along\nwith the shared key are then part of the secret used for\ncalculating the HMAC in the AUTH chunk.\n\nNow, in our scenario, we have 2 threads with 1 non-blocking\nSEQ_PACKET socket each, setting up common shared SCTP_AUTH_KEY\nand SCTP_AUTH_ACTIVE_KEY properly, and each of them calling\nsctp_bindx(3), listen(2) and connect(2) against each other,\nthus the handshake looks similar to this, e.g.:\n\n ---------- INIT[RANDOM; CHUNKS; HMAC-ALGO] ---------->\n <------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] ---------\n <--------- INIT[RANDOM; CHUNKS; HMAC-ALGO] -----------\n -------- INIT-ACK[RANDOM; CHUNKS; HMAC-ALGO] -------->\n ...\n\nSince such collisions can also happen with verification tags,\nthe RFC4895 for AUTH rather vaguely says under section 6.1:\n\n In case of INIT collision, the rules governing the handling\n of this Random Number follow the same pattern as those for\n the Verification Tag, as explained in Section 5.2.4 of\n RFC 2960 [5]. Therefore, each endpoint knows its own Random\n Number and the peer's Random Number after the association\n has been established.\n\nIn RFC2960, section 5.2.4, we're eventually hitting Action B:\n\n B) In this case, both sides may be attempting to start an\n association at about the same time but the peer endpoint\n started its INIT after responding to the local endpoint's\n INIT. Thus it may have picked a new Verification Tag not\n being aware of the previous Tag it had sent this endpoint.\n The endpoint should stay in or enter the ESTABLISHED\n state but it MUST update its peer's Verification Tag from\n the State Cookie, stop any init or cookie timers that may\n running and send a COOKIE ACK.\n\nIn other words, the handling of the Random parameter is the\nsame as behavior for the Verification Tag as described in\nAction B of section 5.2.4.\n\nLooking at the code, we exactly hit the sctp_sf_do_dupcook_b()\ncase which triggers an SCTP_CMD_UPDATE_ASSOC command to the\nside effect interpreter, and in fact it properly copies over\npeer_{random, hmacs, chunks} parameters from the newly created\nassociation to update the existing one.\n\nAlso, the old asoc_shared_key is being released and based on\nthe new params, sctp_auth_asoc_init_active_key() updated.\nHowever, the issue observed in this case is that the previous\nasoc->peer.auth_capable was 0, and has *not* been updated, so\nthat instead of creating a new secret, we're doing an early\nreturn from the function sctp_auth_asoc_init_active_key()\nleaving asoc->asoc_shared_key as NULL. However, we now have to\nauthenticate chunks from the updated chunk list (e.g. COOKIE-ACK).\n\nThat in fact causes the server side when responding with ...\n\n <------------------ AUTH; COOKIE-ACK -----------------\n\n... to trigger a NULL pointer dereference, since in\nsctp_packet_transmit(), it discovers that an AUTH chunk is\nbeing queued for xmit, and thus it calls sctp_auth_calculate_hmac().\n\nSince the asoc->active_key_id is still inherited from the\nendpoint, and the same as encoded into the chunk, it uses\nasoc->asoc_shared_key, which is still NULL, as an asoc_key\nand dereferences it in ...\n\n crypto_hash_setkey(desc.tfm, &asoc_key->data[0], asoc_key->len)\n\n... causing an oops. All this happens because sctp_make_cookie_ack()\ncalled with the *new* association has the peer.auth_capable=1\nand therefore marks the chunk with auth=1 after checking\nsctp_auth_send_cid(), but it is *actually* sent later on over\nthe then *updated* association's transport that didn't initialize\nits shared key due to peer.auth_capable=0. Since control chunks\nin that case are not sent by the temporary association which\nare scheduled for deletion, they are issued for xmit via\nSCTP_CMD_REPLY in the interpreter with the context of the\n*updated* association. peer.auth_capable was 0 in the updated\nassociation (which went from COOKIE_WAIT into ESTABLISHED state),\nsince all previous processing that performed sctp_process_init()\nwas being done on temporary associations, that we eventually\nthrow away each time.\n\nThe correct fix is to update to the new peer.auth_capable\nvalue as well in the collision case via sctp_assoc_update(),\nso that in case the collision migrated from 0 -> 1,\nsctp_auth_asoc_init_active_key() can properly recalculate\nthe secret. This therefore fixes the observed server panic.\n\nFixes: 730fc3d05cd4 (\"[SCTP]: Implete SCTP-AUTH parameter processing\")\nReported-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>\nSigned-off-by: Daniel Borkmann <dborkman@redhat.com>\nTested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>\nCc: Vlad Yasevich <vyasevich@gmail.com>\nAcked-by: Vlad Yasevich <vyasevich@gmail.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 13,220
|
Determine whether the code is vulnerable or not.
|
[
"int tcp_sendpage(struct sock *sk, struct page *page, int offset,\n\t\t size_t size, int flags)\n{\n\tssize_t res;",
"\tif (!(sk->sk_route_caps & NETIF_F_SG) ||\n\t !sk_check_csum_caps(sk))\n\t\treturn sock_no_sendpage(sk->sk_socket, page, offset, size,\n\t\t\t\t\tflags);",
"\tlock_sock(sk);",
"\ttcp_rate_check_app_limited(sk); /* is sending application-limited? */",
"\tres = do_tcp_sendpages(sk, page, offset, size, flags);\n\trelease_sock(sk);\n\treturn res;\n}\n"
] |
[
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-14106",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-14106/",
"CWE ID": "CWE-369",
"codeLink": "https://github.com/torvalds/linux/commit/499350a5a6e7512d9ed369ed63a4244b6536f4f8",
"commit_id": "499350a5a6e7512d9ed369ed63a4244b6536f4f8",
"commit_message": "tcp: initialize rcv_mss to TCP_MIN_MSS instead of 0\n\nWhen tcp_disconnect() is called, inet_csk_delack_init() sets\nicsk->icsk_ack.rcv_mss to 0.\nThis could potentially cause tcp_recvmsg() => tcp_cleanup_rbuf() =>\n__tcp_select_window() call path to have division by 0 issue.\nSo this patch initializes rcv_mss to TCP_MIN_MSS instead of 0.\n\nReported-by: Andrey Konovalov <andreyknvl@google.com>\nSigned-off-by: Wei Wang <weiwan@google.com>\nSigned-off-by: Eric Dumazet <edumazet@google.com>\nSigned-off-by: Neal Cardwell <ncardwell@google.com>\nSigned-off-by: Yuchung Cheng <ycheng@google.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 13,224
|
Determine whether the code is vulnerable or not.
|
[
"static void dwc3_clear_stall_all_ep(struct dwc3 *dwc)\n{\n\tu32 epnum;",
"\tfor (epnum = 1; epnum < DWC3_ENDPOINTS_NUM; epnum++) {\n\t\tstruct dwc3_ep *dep;\n\t\tint ret;",
"\t\tdep = dwc->eps[epnum];\n\t\tif (!dep)\n\t\t\tcontinue;",
"\t\tif (!(dep->flags & DWC3_EP_STALL))\n\t\t\tcontinue;",
"\t\tdep->flags &= ~DWC3_EP_STALL;",
"\t\tret = dwc3_send_clear_stall_ep_cmd(dep);\n\t\tWARN_ON_ONCE(ret);\n\t}\n}\n"
] |
[
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2019-14763",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2019-14763/",
"CWE ID": "CWE-189",
"codeLink": "https://github.com/torvalds/linux/commit/c91815b596245fd7da349ecc43c8def670d2269e",
"commit_id": "c91815b596245fd7da349ecc43c8def670d2269e",
"commit_message": "usb: dwc3: gadget: never call ->complete() from ->ep_queue()\n\nThis is a requirement which has always existed but, somehow, wasn't\nreflected in the documentation and problems weren't found until now\nwhen Tuba Yavuz found a possible deadlock happening between dwc3 and\nf_hid. She described the situation as follows:\n\nspin_lock_irqsave(&hidg->write_spinlock, flags); // first acquire\n/* we our function has been disabled by host */\nif (!hidg->req) {\n\tfree_ep_req(hidg->in_ep, hidg->req);\n\tgoto try_again;\n}\n\n[...]\n\nstatus = usb_ep_queue(hidg->in_ep, hidg->req, GFP_ATOMIC);\n=>\n\t[...]\n\t=> usb_gadget_giveback_request\n\t\t=>\n\t\tf_hidg_req_complete\n\t\t\t=>\n\t\t\tspin_lock_irqsave(&hidg->write_spinlock, flags); // second acquire\n\nNote that this happens because dwc3 would call ->complete() on a\nfailed usb_ep_queue() due to failed Start Transfer command. This is,\nanyway, a theoretical situation because dwc3 currently uses \"No\nResponse Update Transfer\" command for Bulk and Interrupt endpoints.\n\nIt's still good to make this case impossible to happen even if the \"No\nReponse Update Transfer\" command is changed.\n\nReported-by: Tuba Yavuz <tuba@ece.ufl.edu>\nSigned-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>\nCc: stable <stable@vger.kernel.org>\nSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>",
"lang": "C",
"project": "linux"
}
| 13,225
|
Determine whether the code is vulnerable or not.
|
[
"static inline void adjust_tsc_offset_guest(struct kvm_vcpu *vcpu,\n\t\t\t\t\t s64 adjustment)\n{\n\tkvm_x86_ops->adjust_tsc_offset_guest(vcpu, adjustment);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-7513",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-7513/",
"CWE ID": null,
"codeLink": "https://github.com/torvalds/linux/commit/0185604c2d82c560dab2f2933a18f797e74ab5a8",
"commit_id": "0185604c2d82c560dab2f2933a18f797e74ab5a8",
"commit_message": "KVM: x86: Reload pit counters for all channels when restoring state\n\nCurrently if userspace restores the pit counters with a count of 0\non channels 1 or 2 and the guest attempts to read the count on those\nchannels, then KVM will perform a mod of 0 and crash. This will ensure\nthat 0 values are converted to 65536 as per the spec.\n\nThis is CVE-2015-7513.\n\nSigned-off-by: Andy Honig <ahonig@google.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>",
"lang": "C",
"project": "linux"
}
| 13,234
|
Determine whether the code is vulnerable or not.
|
[
"static int decode_attr_fileid(struct xdr_stream *xdr, uint32_t *bitmap, uint64_t *fileid)\n{\n\t__be32 *p;",
"\t*fileid = 0;\n\tif (unlikely(bitmap[0] & (FATTR4_WORD0_FILEID - 1U)))\n\t\treturn -EIO;\n\tif (likely(bitmap[0] & FATTR4_WORD0_FILEID)) {\n\t\tREAD_BUF(8);\n\t\tREAD64(*fileid);\n\t\tbitmap[0] &= ~FATTR4_WORD0_FILEID;\n\t}\n\tdprintk(\"%s: fileid=%Lu\\n\", __func__, (unsigned long long)*fileid);\n\treturn 0;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-4324",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-4324/",
"CWE ID": null,
"codeLink": "https://github.com/torvalds/linux/commit/dc0b027dfadfcb8a5504f7d8052754bf8d501ab9",
"commit_id": "dc0b027dfadfcb8a5504f7d8052754bf8d501ab9",
"commit_message": "NFSv4: Convert the open and close ops to use fmode\n\nSigned-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>",
"lang": "C",
"project": "linux"
}
| 13,240
|
Determine whether the code is vulnerable or not.
|
[
"static void DrawBoundingRectangles(Image *image,const DrawInfo *draw_info,\n const PolygonInfo *polygon_info,ExceptionInfo *exception)\n{\n DrawInfo\n *clone_info;",
" double\n mid;",
" PointInfo\n end,\n resolution,\n start;",
" PrimitiveInfo\n primitive_info[6];",
" register ssize_t\n i;",
" SegmentInfo\n bounds;",
" ssize_t\n coordinates;",
" clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info);\n (void) QueryColorCompliance(\"#0000\",AllCompliance,&clone_info->fill,\n exception);\n resolution.x=DefaultResolution;\n resolution.y=DefaultResolution;\n if (clone_info->density != (char *) NULL)\n {\n GeometryInfo\n geometry_info;",
" MagickStatusType\n flags;",
" flags=ParseGeometry(clone_info->density,&geometry_info);\n resolution.x=geometry_info.rho;\n resolution.y=geometry_info.sigma;\n if ((flags & SigmaValue) == MagickFalse)\n resolution.y=resolution.x;\n }\n mid=(resolution.x/72.0)*ExpandAffine(&clone_info->affine)*\n clone_info->stroke_width/2.0;\n bounds.x1=0.0;\n bounds.y1=0.0;\n bounds.x2=0.0;\n bounds.y2=0.0;\n if (polygon_info != (PolygonInfo *) NULL)\n {\n bounds=polygon_info->edges[0].bounds;\n for (i=1; i < (ssize_t) polygon_info->number_edges; i++)\n {\n if (polygon_info->edges[i].bounds.x1 < (double) bounds.x1)\n bounds.x1=polygon_info->edges[i].bounds.x1;\n if (polygon_info->edges[i].bounds.y1 < (double) bounds.y1)\n bounds.y1=polygon_info->edges[i].bounds.y1;\n if (polygon_info->edges[i].bounds.x2 > (double) bounds.x2)\n bounds.x2=polygon_info->edges[i].bounds.x2;\n if (polygon_info->edges[i].bounds.y2 > (double) bounds.y2)\n bounds.y2=polygon_info->edges[i].bounds.y2;\n }\n bounds.x1-=mid;\n bounds.x1=bounds.x1 < 0.0 ? 0.0 : bounds.x1 >= (double)\n image->columns ? (double) image->columns-1 : bounds.x1;\n bounds.y1-=mid;\n bounds.y1=bounds.y1 < 0.0 ? 0.0 : bounds.y1 >= (double)\n image->rows ? (double) image->rows-1 : bounds.y1;\n bounds.x2+=mid;\n bounds.x2=bounds.x2 < 0.0 ? 0.0 : bounds.x2 >= (double)\n image->columns ? (double) image->columns-1 : bounds.x2;\n bounds.y2+=mid;\n bounds.y2=bounds.y2 < 0.0 ? 0.0 : bounds.y2 >= (double)\n image->rows ? (double) image->rows-1 : bounds.y2;\n for (i=0; i < (ssize_t) polygon_info->number_edges; i++)\n {\n if (polygon_info->edges[i].direction != 0)\n (void) QueryColorCompliance(\"red\",AllCompliance,&clone_info->stroke,\n exception);\n else\n (void) QueryColorCompliance(\"green\",AllCompliance,&clone_info->stroke,\n exception);\n start.x=(double) (polygon_info->edges[i].bounds.x1-mid);\n start.y=(double) (polygon_info->edges[i].bounds.y1-mid);\n end.x=(double) (polygon_info->edges[i].bounds.x2+mid);\n end.y=(double) (polygon_info->edges[i].bounds.y2+mid);\n primitive_info[0].primitive=RectanglePrimitive;\n TraceRectangle(primitive_info,start,end);\n primitive_info[0].method=ReplaceMethod;\n coordinates=(ssize_t) primitive_info[0].coordinates;\n primitive_info[coordinates].primitive=UndefinedPrimitive;\n (void) DrawPrimitive(image,clone_info,primitive_info,exception);\n }\n }\n (void) QueryColorCompliance(\"blue\",AllCompliance,&clone_info->stroke,\n exception);\n start.x=(double) (bounds.x1-mid);\n start.y=(double) (bounds.y1-mid);\n end.x=(double) (bounds.x2+mid);\n end.y=(double) (bounds.y2+mid);\n primitive_info[0].primitive=RectanglePrimitive;\n TraceRectangle(primitive_info,start,end);\n primitive_info[0].method=ReplaceMethod;\n coordinates=(ssize_t) primitive_info[0].coordinates;\n primitive_info[coordinates].primitive=UndefinedPrimitive;\n (void) DrawPrimitive(image,clone_info,primitive_info,exception);\n clone_info=DestroyDrawInfo(clone_info);\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-4564",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-4564/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/ImageMagick/ImageMagick/commit/726812fa2fa7ce16bcf58f6e115f65427a1c0950",
"commit_id": "726812fa2fa7ce16bcf58f6e115f65427a1c0950",
"commit_message": "Prevent buffer overflow in magick/draw.c",
"lang": "C",
"project": "ImageMagick"
}
| 13,241
|
Determine whether the code is vulnerable or not.
|
[
"BOOL update_bounds_equals(rdpBounds* bounds1, rdpBounds* bounds2)\n{\n\tif ((bounds1->left == bounds2->left) && (bounds1->top == bounds2->top) &&\n\t (bounds1->right == bounds2->right) && (bounds1->bottom == bounds2->bottom))\n\t\treturn TRUE;",
"\treturn FALSE;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-8786",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-8786/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/FreeRDP/FreeRDP/commit/445a5a42c500ceb80f8fa7f2c11f3682538033f3",
"commit_id": "445a5a42c500ceb80f8fa7f2c11f3682538033f3",
"commit_message": "Fixed CVE-2018-8786\n\nThanks to Eyal Itkin from Check Point Software Technologies.",
"lang": "C",
"project": "FreeRDP"
}
| 13,245
|
Determine whether the code is vulnerable or not.
|
[
"void SafeBrowsingBlockingPageTest::MalwareRedirectCancelAndProceed(\n const std::string open_function) {\n GURL load_url = test_server()->GetURL(\n \"files/safe_browsing/interstitial_cancel.html\");\n GURL malware_url(\"http://localhost/files/safe_browsing/malware.html\");\n AddURLResult(malware_url, SafeBrowsingService::URL_MALWARE);",
" ui_test_utils::NavigateToURL(browser(), load_url);\n ui_test_utils::NavigateToURLWithDisposition(\n browser(),\n GURL(\"javascript:\" + open_function + \"()\"),\n CURRENT_TAB,\n ui_test_utils::BROWSER_TEST_WAIT_FOR_TAB);\n WaitForInterstitial();\n browser()->ActivateTabAt(0, true);\n ui_test_utils::NavigateToURLWithDisposition(\n browser(),\n GURL(\"javascript:stopWin()\"),\n CURRENT_TAB,\n ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);\n browser()->ActivateTabAt(1, true);\n SendCommand(\"\\\"proceed\\\"\");\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": null,
"CVE Page": null,
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/6a13a6c2fbae0b3269743e6a141fdfe0d9ec9793",
"commit_id": "6a13a6c2fbae0b3269743e6a141fdfe0d9ec9793",
"commit_message": "Don't delete the current NavigationEntry when leaving an interstitial page.\n\nBUG=107182\nTEST=See bug\n\nReview URL: http://codereview.chromium.org/8976014\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@115189 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 13,249
|
Determine whether the code is vulnerable or not.
|
[
"int WavpackStoreMD5Sum (WavpackContext *wpc, unsigned char data [16])\n{\n return add_to_metadata (wpc, data, 16, (wpc->config.qmode & 0xff) ? ID_ALT_MD5_CHECKSUM : ID_MD5_CHECKSUM);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-19840",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-19840/",
"CWE ID": "CWE-835",
"codeLink": "https://github.com/dbry/WavPack/commit/070ef6f138956d9ea9612e69586152339dbefe51",
"commit_id": "070ef6f138956d9ea9612e69586152339dbefe51",
"commit_message": "issue #53: error out on zero sample rate",
"lang": "C",
"project": "WavPack"
}
| 13,250
|
Determine whether the code is vulnerable or not.
|
[
"std::string Experiment::NameForChoice(int index) const {\n DCHECK(type == Experiment::MULTI_VALUE ||\n type == Experiment::ENABLE_DISABLE_VALUE);\n DCHECK_LT(index, num_choices);\n return std::string(internal_name) + testing::kMultiSeparator +\n base::IntToString(index);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-6622",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-6622/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/chromium/chromium/commit/438b99bc730bc665eedfc62c4eb864c981e5c65f",
"commit_id": "438b99bc730bc665eedfc62c4eb864c981e5c65f",
"commit_message": "Remove --disable-app-shims.\n\nApp shims have been enabled by default for 3 milestones\n(since r242711).\n\nBUG=350161\n\nReview URL: https://codereview.chromium.org/298953002\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@272786 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 13,257
|
Determine whether the code is vulnerable or not.
|
[
"virDomainUpdateDeviceFlags(virDomainPtr domain,\n const char *xml, unsigned int flags)\n{\n virConnectPtr conn;",
" VIR_DOMAIN_DEBUG(domain, \"xml=%s, flags=%x\", xml, flags);",
" virResetLastError();",
" virCheckDomainReturn(domain, -1);\n conn = domain->conn;",
" virCheckNonNullArgGoto(xml, error);\n virCheckReadOnlyGoto(conn->flags, error);",
" if (conn->driver->domainUpdateDeviceFlags) {\n int ret;\n ret = conn->driver->domainUpdateDeviceFlags(domain, xml, flags);\n if (ret < 0)\n goto error;\n return ret;\n }",
" virReportUnsupportedError();",
" error:\n virDispatchError(domain->conn);\n return -1;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-10746",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-10746/",
"CWE ID": "CWE-254",
"codeLink": "https://github.com/libvirt/libvirt/commit/506e9d6c2d4baaf580d489fff0690c0ff2ff588f",
"commit_id": "506e9d6c2d4baaf580d489fff0690c0ff2ff588f",
"commit_message": "virDomainGetTime: Deny on RO connections\n\nWe have a policy that if API may end up talking to a guest agent\nit should require RW connection. We don't obey the rule in\nvirDomainGetTime().\n\nSigned-off-by: Michal Privoznik <mprivozn@redhat.com>",
"lang": "C",
"project": "libvirt"
}
| 13,261
|
Determine whether the code is vulnerable or not.
|
[
"int AecGetParameter(preproc_effect_t *effect,\n void *pParam,\n uint32_t *pValueSize,\n void *pValue)\n{\n int status = 0;\n uint32_t param = *(uint32_t *)pParam;",
" if (*pValueSize < sizeof(uint32_t)) {\n return -EINVAL;\n }\n switch (param) {\n case AEC_PARAM_ECHO_DELAY:\n case AEC_PARAM_PROPERTIES:\n *(uint32_t *)pValue = 1000 * effect->session->apm->stream_delay_ms();\n ALOGV(\"AecGetParameter() echo delay %d us\", *(uint32_t *)pValue);\n break;\n default:\n ALOGW(\"AecGetParameter() unknown param %08x value %08x\", param, *(uint32_t *)pValue);\n status = -EINVAL;\n break;\n }\n return status;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-3842",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-3842/",
"CWE ID": "CWE-119",
"codeLink": "https://android.googlesource.com/platform/frameworks/av/+/aeea52da00d210587fb3ed895de3d5f2e0264c88",
"commit_id": "aeea52da00d210587fb3ed895de3d5f2e0264c88",
"commit_message": "audio effects: fix heap overflow\n\nCheck consistency of effect command reply sizes before\ncopying to reply address.\n\nAlso add null pointer check on reply size.\nAlso remove unused parameter warning.\n\nBug: 21953516.\nChange-Id: I4cf00c12eaed696af28f3b7613f7e36f47a160c4\n(cherry picked from commit 0f714a464d2425afe00d6450535e763131b40844)\n",
"lang": "C",
"project": "Android"
}
| 13,262
|
Determine whether the code is vulnerable or not.
|
[
"void FrameView::flushAnyPendingPostLayoutTasks()\n{\n ASSERT(!isInPerformLayout());\n if (m_postLayoutTasksTimer.isActive())\n performPostLayoutTasks();\n if (m_updateWidgetsTimer.isActive())\n updateWidgetsTimerFired(0);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2014-3191",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2014-3191/",
"CWE ID": "CWE-416",
"codeLink": "https://github.com/chromium/chromium/commit/11a4cc4a6d6e665d9a118fada4b7c658d6f70d95",
"commit_id": "11a4cc4a6d6e665d9a118fada4b7c658d6f70d95",
"commit_message": "Defer call to updateWidgetPositions() outside of RenderLayerScrollableArea.\n\nupdateWidgetPositions() can destroy the render tree, so it should never\nbe called from inside RenderLayerScrollableArea. Leaving it there allows\nfor the potential of use-after-free bugs.\n\nBUG=402407\nR=vollick@chromium.org\n\nReview URL: https://codereview.chromium.org/490473003\n\ngit-svn-id: svn://svn.chromium.org/blink/trunk@180681 bbb929c8-8fbe-4397-9dbb-9b2b20218538",
"lang": "C",
"project": "Chrome"
}
| 13,264
|
Determine whether the code is vulnerable or not.
|
[
"PHP_FUNCTION(openssl_pkcs12_read)\n{\n\tzval *zout = NULL, zextracerts, zcert, zpkey;\n\tchar *pass, *zp12;\n\tsize_t pass_len, zp12_len;\n\tPKCS12 * p12 = NULL;\n\tEVP_PKEY * pkey = NULL;\n\tX509 * cert = NULL;\n\tSTACK_OF(X509) * ca = NULL;\n\tBIO * bio_in = NULL;\n\tint i;",
"\tif (zend_parse_parameters(ZEND_NUM_ARGS(), \"sz/s\", &zp12, &zp12_len, &zout, &pass, &pass_len) == FAILURE)\n\t\treturn;",
"\tRETVAL_FALSE;",
"\tPHP_OPENSSL_CHECK_SIZE_T_TO_INT(zp12_len, pkcs12);",
"\tbio_in = BIO_new(BIO_s_mem());",
"\tif(0 >= BIO_write(bio_in, zp12, (int)zp12_len))\n\t\tgoto cleanup;",
"\tif(d2i_PKCS12_bio(bio_in, &p12)) {\n\t\tif(PKCS12_parse(p12, pass, &pkey, &cert, &ca)) {\n\t\t\tBIO * bio_out;\n\t\t\tint cert_num;",
"\t\t\tzval_dtor(zout);\n\t\t\tarray_init(zout);",
"\t\t\tif (cert) {\n\t\t\t\tbio_out = BIO_new(BIO_s_mem());\n\t\t\t\tif (PEM_write_bio_X509(bio_out, cert)) {\n\t\t\t\t\tBUF_MEM *bio_buf;\n\t\t\t\t\tBIO_get_mem_ptr(bio_out, &bio_buf);\n\t\t\t\t\tZVAL_STRINGL(&zcert, bio_buf->data, bio_buf->length);\n\t\t\t\t\tadd_assoc_zval(zout, \"cert\", &zcert);\n\t\t\t\t}\n\t\t\t\tBIO_free(bio_out);\n\t\t\t}",
"\t\t\tif (pkey) {\n\t\t\t\tbio_out = BIO_new(BIO_s_mem());\n\t\t\t\tif (PEM_write_bio_PrivateKey(bio_out, pkey, NULL, NULL, 0, 0, NULL)) {\n\t\t\t\t\tBUF_MEM *bio_buf;\n\t\t\t\t\tBIO_get_mem_ptr(bio_out, &bio_buf);\n\t\t\t\t\tZVAL_STRINGL(&zpkey, bio_buf->data, bio_buf->length);\n\t\t\t\t\tadd_assoc_zval(zout, \"pkey\", &zpkey);\n\t\t\t\t}\n\t\t\t\tBIO_free(bio_out);\n\t\t\t}",
"\t\t\tcert_num = sk_X509_num(ca);\n\t\t\tif (ca && cert_num > 0) {",
"\t\t\t\tarray_init(&zextracerts);",
"\t\t\t\tfor (i=0; i < cert_num; i++) {\n\t\t\t\t\tzval zextracert;\n\t\t\t\t\tX509* aCA = sk_X509_pop(ca);\n\t\t\t\t\tif (!aCA) break;",
"\t\t\t\t\t/* fix for bug 69882 */\n\t\t\t\t\t{\n\t\t\t\t\t\tint err = ERR_peek_error();\n\t\t\t\t\t\tif (err == OPENSSL_ERROR_X509_PRIVATE_KEY_VALUES_MISMATCH) {\n\t\t\t\t\t\t\tERR_get_error();\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"\t\t\t\t\tbio_out = BIO_new(BIO_s_mem());\n\t\t\t\t\tif (PEM_write_bio_X509(bio_out, aCA)) {\n\t\t\t\t\t\tBUF_MEM *bio_buf;\n\t\t\t\t\t\tBIO_get_mem_ptr(bio_out, &bio_buf);\n\t\t\t\t\t\tZVAL_STRINGL(&zextracert, bio_buf->data, bio_buf->length);\n\t\t\t\t\t\tadd_index_zval(&zextracerts, i, &zextracert);",
"\t\t\t\t\t}\n\t\t\t\t\tBIO_free(bio_out);",
"\t\t\t\t\tX509_free(aCA);\n\t\t\t\t}",
"\t\t\t\tsk_X509_free(ca);\n\t\t\t\tadd_assoc_zval(zout, \"extracerts\", &zextracerts);\n\t\t\t}",
"\t\t\tRETVAL_TRUE;",
"\t\t\tPKCS12_free(p12);\n\t\t}\n\t}",
"\tcleanup:\n\tif (bio_in) {\n\t\tBIO_free(bio_in);\n\t}\n\tif (pkey) {\n\t\tEVP_PKEY_free(pkey);\n\t}\n\tif (cert) {\n\t\tX509_free(cert);\n\t}\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-11144",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-11144/",
"CWE ID": "CWE-754",
"codeLink": "https://git.php.net/?p=php-src.git;a=commit;h=73cabfedf519298e1a11192699f44d53c529315e",
"commit_id": "73cabfedf519298e1a11192699f44d53c529315e",
"commit_message": null,
"lang": "C",
"project": "php"
}
| 13,271
|
Determine whether the code is vulnerable or not.
|
[
"static int create_lockd_family(struct svc_serv *serv, struct net *net,\n\t\t\t const int family)\n{\n\tint err;",
"\terr = create_lockd_listener(serv, \"udp\", net, family, nlm_udpport);\n\tif (err < 0)\n\t\treturn err;",
"\treturn create_lockd_listener(serv, \"tcp\", net, family, nlm_tcpport);\n}\n"
] |
[
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-9059",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-9059/",
"CWE ID": "CWE-404",
"codeLink": "https://github.com/torvalds/linux/commit/c70422f760c120480fee4de6c38804c72aa26bc1",
"commit_id": "c70422f760c120480fee4de6c38804c72aa26bc1",
"commit_message": "Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux\n\nPull nfsd updates from Bruce Fields:\n \"Another RDMA update from Chuck Lever, and a bunch of miscellaneous\n bugfixes\"\n\n* tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits)\n nfsd: Fix up the \"supattr_exclcreat\" attributes\n nfsd: encoders mustn't use unitialized values in error cases\n nfsd: fix undefined behavior in nfsd4_layout_verify\n lockd: fix lockd shutdown race\n NFSv4: Fix callback server shutdown\n SUNRPC: Refactor svc_set_num_threads()\n NFSv4.x/callback: Create the callback service through svc_create_pooled\n lockd: remove redundant check on block\n svcrdma: Clean out old XDR encoders\n svcrdma: Remove the req_map cache\n svcrdma: Remove unused RDMA Write completion handler\n svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt\n svcrdma: Clean up RPC-over-RDMA backchannel reply processing\n svcrdma: Report Write/Reply chunk overruns\n svcrdma: Clean up RDMA_ERROR path\n svcrdma: Use rdma_rw API in RPC reply path\n svcrdma: Introduce local rdma_rw API helpers\n svcrdma: Clean up svc_rdma_get_inv_rkey()\n svcrdma: Add helper to save pages under I/O\n svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT\n ...",
"lang": "C",
"project": "linux"
}
| 13,281
|
Determine whether the code is vulnerable or not.
|
[
"static MagickBooleanType SkipDXTMipmaps(Image *image,DDSInfo *dds_info,\n int texel_size,ExceptionInfo *exception)\n{\n register ssize_t\n i;",
" MagickOffsetType\n offset;",
" size_t\n h,\n w;",
" /*\n Only skip mipmaps for textures and cube maps\n */\n if (EOFBlob(image) != MagickFalse)\n {\n ThrowFileException(exception,CorruptImageError,\"UnexpectedEndOfFile\",\n image->filename);\n return(MagickFalse);\n }\n if (dds_info->ddscaps1 & DDSCAPS_MIPMAP\n && (dds_info->ddscaps1 & DDSCAPS_TEXTURE\n || dds_info->ddscaps2 & DDSCAPS2_CUBEMAP))\n {\n w = DIV2(dds_info->width);\n h = DIV2(dds_info->height);",
" /*\n Mipmapcount includes the main image, so start from one\n */\n for (i = 1; (i < (ssize_t) dds_info->mipmapcount) && w && h; i++)\n {\n offset = (MagickOffsetType) ((w + 3) / 4) * ((h + 3) / 4) * texel_size;\n if (SeekBlob(image,offset,SEEK_CUR) < 0)\n break;\n w = DIV2(w);\n h = DIV2(h);\n }\n }\n return(MagickTrue);\n}\n"
] |
[
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-8959",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-8959/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/ImageMagick/ImageMagick/commit/3ab016764c7f787829d9065440d86f5609765110",
"commit_id": "3ab016764c7f787829d9065440d86f5609765110",
"commit_message": "http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=26861",
"lang": "C",
"project": "ImageMagick"
}
| 13,285
|
Determine whether the code is vulnerable or not.
|
[
"static void bitline2chunky(CDXLVideoContext *c, int linesize, uint8_t *out)\n{\n GetBitContext gb;\n int x, y, plane;",
" if (init_get_bits8(&gb, c->video, c->video_size) < 0)\n return;\n for (y = 0; y < c->avctx->height; y++) {\n for (plane = 0; plane < c->bpp; plane++) {\n for (x = 0; x < c->avctx->width; x++)\n out[linesize * y + x] |= get_bits1(&gb) << plane;\n skip_bits(&gb, c->padded_bits);\n }\n }\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-9996",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-9996/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/FFmpeg/FFmpeg/commit/1e42736b95065c69a7481d0cf55247024f54b660",
"commit_id": "1e42736b95065c69a7481d0cf55247024f54b660",
"commit_message": "avcodec/cdxl: Check format for BGR24\n\nFixes: out of array access\nFixes: 1427/clusterfuzz-testcase-minimized-5020737339392000\n\nFound-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg\nSigned-off-by: Michael Niedermayer <michael@niedermayer.cc>",
"lang": "C",
"project": "FFmpeg"
}
| 13,294
|
Determine whether the code is vulnerable or not.
|
[
"static inline void free_copy(struct msg_msg *copy)\n{\n\tif (copy)\n\t\tfree_msg(copy);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-4483",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-4483/",
"CWE ID": "CWE-189",
"codeLink": "https://github.com/torvalds/linux/commit/6062a8dc0517bce23e3c2f7d2fea5e22411269a3",
"commit_id": "6062a8dc0517bce23e3c2f7d2fea5e22411269a3",
"commit_message": "ipc,sem: fine grained locking for semtimedop\n\nIntroduce finer grained locking for semtimedop, to handle the common case\nof a program wanting to manipulate one semaphore from an array with\nmultiple semaphores.\n\nIf the call is a semop manipulating just one semaphore in an array with\nmultiple semaphores, only take the lock for that semaphore itself.\n\nIf the call needs to manipulate multiple semaphores, or another caller is\nin a transaction that manipulates multiple semaphores, the sem_array lock\nis taken, as well as all the locks for the individual semaphores.\n\nOn a 24 CPU system, performance numbers with the semop-multi\ntest with N threads and N semaphores, look like this:\n\n\tvanilla\t\tDavidlohr's\tDavidlohr's +\tDavidlohr's +\nthreads\t\t\tpatches\t\trwlock patches\tv3 patches\n10\t610652\t\t726325\t\t1783589\t\t2142206\n20\t341570\t\t365699\t\t1520453\t\t1977878\n30\t288102\t\t307037\t\t1498167\t\t2037995\n40\t290714\t\t305955\t\t1612665\t\t2256484\n50\t288620\t\t312890\t\t1733453\t\t2650292\n60\t289987\t\t306043\t\t1649360\t\t2388008\n70\t291298\t\t306347\t\t1723167\t\t2717486\n80\t290948\t\t305662\t\t1729545\t\t2763582\n90\t290996\t\t306680\t\t1736021\t\t2757524\n100\t292243\t\t306700\t\t1773700\t\t3059159\n\n[davidlohr.bueso@hp.com: do not call sem_lock when bogus sma]\n[davidlohr.bueso@hp.com: make refcounter atomic]\nSigned-off-by: Rik van Riel <riel@redhat.com>\nSuggested-by: Linus Torvalds <torvalds@linux-foundation.org>\nAcked-by: Davidlohr Bueso <davidlohr.bueso@hp.com>\nCc: Chegu Vinod <chegu_vinod@hp.com>\nCc: Jason Low <jason.low2@hp.com>\nReviewed-by: Michel Lespinasse <walken@google.com>\nCc: Peter Hurley <peter@hurleysoftware.com>\nCc: Stanislav Kinsbursky <skinsbursky@parallels.com>\nTested-by: Emmanuel Benisty <benisty.e@gmail.com>\nTested-by: Sedat Dilek <sedat.dilek@gmail.com>\nSigned-off-by: Andrew Morton <akpm@linux-foundation.org>\nSigned-off-by: Linus Torvalds <torvalds@linux-foundation.org>",
"lang": "C",
"project": "linux"
}
| 13,300
|
Determine whether the code is vulnerable or not.
|
[
"zone_get_steps(int zone_index)\n{\n\tstruct map_zone* zone;",
"\tzone = vector_get(s_map->zones, zone_index);\n\treturn zone->interval;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-1000524",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-1000524/",
"CWE ID": "CWE-190",
"codeLink": "https://github.com/fatcerberus/minisphere/commit/252c1ca184cb38e1acb917aa0e451c5f08519996",
"commit_id": "252c1ca184cb38e1acb917aa0e451c5f08519996",
"commit_message": "Fix integer overflow in layer_resize in map_engine.c (#268)\n\n* Fix integer overflow in layer_resize in map_engine.c\r\n\r\nThere's a buffer overflow bug in the function layer_resize. It allocates\r\na buffer `tilemap` with size `x_size * y_size * sizeof(struct map_tile)`.\r\nBut it didn't check for integer overflow, so if x_size and y_size are\r\nvery large, it's possible that the buffer size is smaller than needed,\r\ncausing a buffer overflow later.\r\n\r\nPoC: `SetLayerSize(0, 0x7FFFFFFF, 0x7FFFFFFF);`\r\n\r\n* move malloc to a separate line",
"lang": "C",
"project": "minisphere"
}
| 13,301
|
Determine whether the code is vulnerable or not.
|
[
"xps_true_callback_encode_char(gs_font *pfont, gs_char chr, gs_glyph_space_t spc)\n{\n xps_font_t *font = pfont->client_data;\n int value;",
" value = xps_encode_font_char(font, chr);\n if (value == 0)\n return GS_NO_GLYPH;\n return value;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-9619",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-9619/",
"CWE ID": "CWE-119",
"codeLink": "http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=c53183d4e7103e87368b7cfa15367a47d559e323",
"commit_id": "c53183d4e7103e87368b7cfa15367a47d559e323",
"commit_message": null,
"lang": "C",
"project": "ghostscript"
}
| 13,311
|
Determine whether the code is vulnerable or not.
|
[
"static ImageEventSender& errorEventSender() {\n DEFINE_STATIC_LOCAL(ImageEventSender, sender,\n (ImageEventSender::create(EventTypeNames::error)));\n return sender;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-1265",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-1265/",
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/ce1a9c0e454b08c96ca73788a1b4dccb405ce027",
"commit_id": "ce1a9c0e454b08c96ca73788a1b4dccb405ce027",
"commit_message": "Move ImageLoader timer to frame-specific TaskRunnerTimer.\n\nMove ImageLoader timer m_derefElementTimer to frame-specific TaskRunnerTimer.\nThis associates it with the frame's Networking timer task queue.\n\nBUG=624694\n\nReview-Url: https://codereview.chromium.org/2642103002\nCr-Commit-Position: refs/heads/master@{#444927}",
"lang": "C",
"project": "Chrome"
}
| 13,316
|
Determine whether the code is vulnerable or not.
|
[
"cmsBool Read16bitTables(cmsContext ContextID, cmsIOHANDLER* io, cmsPipeline* lut, int nChannels, int nEntries)\n{\n int i;\n cmsToneCurve* Tables[cmsMAXCHANNELS];",
" if (nEntries <= 0) return TRUE;",
" if (nEntries < 2) return FALSE;\n if (nChannels > cmsMAXCHANNELS) return FALSE;",
" memset(Tables, 0, sizeof(Tables));",
" for (i=0; i < nChannels; i++) {",
" Tables[i] = cmsBuildTabulatedToneCurve16(ContextID, nEntries, NULL);\n if (Tables[i] == NULL) goto Error;",
" if (!_cmsReadUInt16Array(io, nEntries, Tables[i]->Table16)) goto Error;\n }",
"\n if (!cmsPipelineInsertStage(lut, cmsAT_END, cmsStageAllocToneCurves(ContextID, nChannels, Tables)))\n goto Error;",
" for (i=0; i < nChannels; i++)\n cmsFreeToneCurve(Tables[i]);",
" return TRUE;",
"Error:\n for (i=0; i < nChannels; i++) {\n if (Tables[i]) cmsFreeToneCurve(Tables[i]);\n }",
" return FALSE;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-10165",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-10165/",
"CWE ID": "CWE-125",
"codeLink": "https://github.com/mm2/Little-CMS/commit/5ca71a7bc18b6897ab21d815d15e218e204581e2",
"commit_id": "5ca71a7bc18b6897ab21d815d15e218e204581e2",
"commit_message": "Added an extra check to MLU bounds\n\nThanks to Ibrahim el-sayed for spotting the bug",
"lang": "C",
"project": "Little-CMS"
}
| 13,325
|
Determine whether the code is vulnerable or not.
|
[
"void WebContentsImpl::OnDidLoadResourceFromMemoryCache(\n const GURL& url,\n const std::string& security_info,\n const std::string& http_method,\n const std::string& mime_type,\n ResourceType resource_type) {\n SSLStatus status;\n if (!DeserializeSecurityInfo(security_info, &status)) {\n bad_message::ReceivedBadMessage(\n GetRenderProcessHost(),\n bad_message::WC_MEMORY_CACHE_RESOURCE_BAD_SECURITY_INFO);\n return;\n }",
" LoadFromMemoryCacheDetails details(\n url, status.cert_id, status.cert_status, http_method, mime_type,\n resource_type);",
" controller_.ssl_manager()->DidLoadFromMemoryCache(details);",
" FOR_EACH_OBSERVER(WebContentsObserver, observers_,\n DidLoadResourceFromMemoryCache(details));",
" if (url.is_valid() && url.SchemeIsHTTPOrHTTPS()) {\n scoped_refptr<net::URLRequestContextGetter> request_context(\n resource_type == RESOURCE_TYPE_MEDIA ?\n GetBrowserContext()->GetMediaRequestContextForRenderProcess(\n GetRenderProcessHost()->GetID()) :\n GetBrowserContext()->GetRequestContextForRenderProcess(\n GetRenderProcessHost()->GetID()));\n BrowserThread::PostTask(\n BrowserThread::IO,\n FROM_HERE,\n base::Bind(&NotifyCacheOnIO, request_context, url, http_method));\n }\n}\n"
] |
[
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-1641",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-1641/",
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/75ca8ffd7bd7c58ace1144df05e1307d8d707662",
"commit_id": "75ca8ffd7bd7c58ace1144df05e1307d8d707662",
"commit_message": "Don't call WebContents::DownloadImage() callback if the WebContents were deleted\n\nBUG=583718\n\nReview URL: https://codereview.chromium.org/1685343004\n\nCr-Commit-Position: refs/heads/master@{#375700}",
"lang": "C",
"project": "Chrome"
}
| 13,328
|
Determine whether the code is vulnerable or not.
|
[
"void WebGraphicsContext3DDefaultImpl::synthesizeGLError(unsigned long error)\n{\n m_syntheticErrors.add(error);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": null,
"CVE Page": null,
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/327585cb0eab0859518643a2d00917081f7e7645",
"commit_id": "327585cb0eab0859518643a2d00917081f7e7645",
"commit_message": "2010-10-26 Kenneth Russell <kbr@google.com>\n\n Reviewed by Andreas Kling.\n\n Valgrind failure in GraphicsContext3DInternal::reshape\n https://bugs.webkit.org/show_bug.cgi?id=48284\n\n * src/WebGraphicsContext3DDefaultImpl.cpp:\n (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl):\n\n\ngit-svn-id: svn://svn.chromium.org/blink/trunk@70534 bbb929c8-8fbe-4397-9dbb-9b2b20218538",
"lang": "C",
"project": "Chrome"
}
| 13,335
|
Determine whether the code is vulnerable or not.
|
[
"static int send_msg(struct kiocb *iocb, struct socket *sock,\n\t\t struct msghdr *m, size_t total_len)\n{\n\tstruct sock *sk = sock->sk;\n\tstruct tipc_port *tport = tipc_sk_port(sk);\n\tstruct sockaddr_tipc *dest = (struct sockaddr_tipc *)m->msg_name;\n\tint needs_conn;\n\tlong timeout_val;\n\tint res = -EINVAL;",
"\tif (unlikely(!dest))\n\t\treturn -EDESTADDRREQ;\n\tif (unlikely((m->msg_namelen < sizeof(*dest)) ||\n\t\t (dest->family != AF_TIPC)))\n\t\treturn -EINVAL;\n\tif (total_len > TIPC_MAX_USER_MSG_SIZE)\n\t\treturn -EMSGSIZE;",
"\tif (iocb)\n\t\tlock_sock(sk);",
"\tneeds_conn = (sock->state != SS_READY);\n\tif (unlikely(needs_conn)) {\n\t\tif (sock->state == SS_LISTENING) {\n\t\t\tres = -EPIPE;\n\t\t\tgoto exit;\n\t\t}\n\t\tif (sock->state != SS_UNCONNECTED) {\n\t\t\tres = -EISCONN;\n\t\t\tgoto exit;\n\t\t}\n\t\tif (tport->published) {\n\t\t\tres = -EOPNOTSUPP;\n\t\t\tgoto exit;\n\t\t}\n\t\tif (dest->addrtype == TIPC_ADDR_NAME) {\n\t\t\ttport->conn_type = dest->addr.name.name.type;\n\t\t\ttport->conn_instance = dest->addr.name.name.instance;\n\t\t}",
"\t\t/* Abort any pending connection attempts (very unlikely) */\n\t\treject_rx_queue(sk);\n\t}",
"\ttimeout_val = sock_sndtimeo(sk, m->msg_flags & MSG_DONTWAIT);",
"\tdo {\n\t\tif (dest->addrtype == TIPC_ADDR_NAME) {\n\t\t\tres = dest_name_check(dest, m);\n\t\t\tif (res)\n\t\t\t\tbreak;\n\t\t\tres = tipc_send2name(tport->ref,\n\t\t\t\t\t &dest->addr.name.name,\n\t\t\t\t\t dest->addr.name.domain,\n\t\t\t\t\t m->msg_iov,\n\t\t\t\t\t total_len);\n\t\t} else if (dest->addrtype == TIPC_ADDR_ID) {\n\t\t\tres = tipc_send2port(tport->ref,\n\t\t\t\t\t &dest->addr.id,\n\t\t\t\t\t m->msg_iov,\n\t\t\t\t\t total_len);\n\t\t} else if (dest->addrtype == TIPC_ADDR_MCAST) {\n\t\t\tif (needs_conn) {\n\t\t\t\tres = -EOPNOTSUPP;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tres = dest_name_check(dest, m);\n\t\t\tif (res)\n\t\t\t\tbreak;\n\t\t\tres = tipc_multicast(tport->ref,\n\t\t\t\t\t &dest->addr.nameseq,\n\t\t\t\t\t m->msg_iov,\n\t\t\t\t\t total_len);\n\t\t}\n\t\tif (likely(res != -ELINKCONG)) {\n\t\t\tif (needs_conn && (res >= 0))\n\t\t\t\tsock->state = SS_CONNECTING;\n\t\t\tbreak;\n\t\t}\n\t\tif (timeout_val <= 0L) {\n\t\t\tres = timeout_val ? timeout_val : -EWOULDBLOCK;\n\t\t\tbreak;\n\t\t}\n\t\trelease_sock(sk);\n\t\ttimeout_val = wait_event_interruptible_timeout(*sk_sleep(sk),\n\t\t\t\t\t !tport->congested, timeout_val);\n\t\tlock_sock(sk);\n\t} while (1);",
"exit:\n\tif (iocb)\n\t\trelease_sock(sk);\n\treturn res;\n}\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-7271",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-7271/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/torvalds/linux/commit/f3d3342602f8bcbf37d7c46641cb9bca7618eb1c",
"commit_id": "f3d3342602f8bcbf37d7c46641cb9bca7618eb1c",
"commit_message": "net: rework recvmsg handler msg_name and msg_namelen logic\n\nThis patch now always passes msg->msg_namelen as 0. recvmsg handlers must\nset msg_namelen to the proper size <= sizeof(struct sockaddr_storage)\nto return msg_name to the user.\n\nThis prevents numerous uninitialized memory leaks we had in the\nrecvmsg handlers and makes it harder for new code to accidentally leak\nuninitialized memory.\n\nOptimize for the case recvfrom is called with NULL as address. We don't\nneed to copy the address at all, so set it to NULL before invoking the\nrecvmsg handler. We can do so, because all the recvmsg handlers must\ncope with the case a plain read() is called on them. read() also sets\nmsg_name to NULL.\n\nAlso document these changes in include/linux/net.h as suggested by David\nMiller.\n\nChanges since RFC:\n\nSet msg->msg_name = NULL if user specified a NULL in msg_name but had a\nnon-null msg_namelen in verify_iovec/verify_compat_iovec. This doesn't\naffect sendto as it would bail out earlier while trying to copy-in the\naddress. It also more naturally reflects the logic by the callers of\nverify_iovec.\n\nWith this change in place I could remove \"\nif (!uaddr || msg_sys->msg_namelen == 0)\n\tmsg->msg_name = NULL\n\".\n\nThis change does not alter the user visible error logic as we ignore\nmsg_namelen as long as msg_name is NULL.\n\nAlso remove two unnecessary curly brackets in ___sys_recvmsg and change\ncomments to netdev style.\n\nCc: David Miller <davem@davemloft.net>\nSuggested-by: Eric Dumazet <eric.dumazet@gmail.com>\nSigned-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>\nSigned-off-by: David S. Miller <davem@davemloft.net>",
"lang": "C",
"project": "linux"
}
| 13,338
|
Determine whether the code is vulnerable or not.
|
[
"static void scanMode(void) {\n redisReply *reply;\n unsigned long long cur = 0;",
" do {\n if (config.pattern)\n reply = redisCommand(context,\"SCAN %llu MATCH %s\",\n cur,config.pattern);\n else\n reply = redisCommand(context,\"SCAN %llu\",cur);\n if (reply == NULL) {\n printf(\"I/O error\\n\");\n exit(1);\n } else if (reply->type == REDIS_REPLY_ERROR) {\n printf(\"ERROR: %s\\n\", reply->str);\n exit(1);\n } else {\n unsigned int j;",
" cur = strtoull(reply->element[0]->str,NULL,10);\n for (j = 0; j < reply->element[1]->elements; j++)\n printf(\"%s\\n\", reply->element[1]->element[j]->str);\n }\n freeReplyObject(reply);\n } while(cur != 0);",
" exit(0);\n}\n"
] |
[
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2018-12326",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2018-12326/",
"CWE ID": "CWE-119",
"codeLink": "https://github.com/antirez/redis/commit/9fdcc15962f9ff4baebe6fdd947816f43f730d50",
"commit_id": "9fdcc15962f9ff4baebe6fdd947816f43f730d50",
"commit_message": "Security: fix redis-cli buffer overflow.\n\nThanks to Fakhri Zulkifli for reporting it.\n\nThe fix switched to dynamic allocation, copying the final prompt in the\nstatic buffer only at the end.",
"lang": "C",
"project": "redis"
}
| 13,339
|
Determine whether the code is vulnerable or not.
|
[
"static void swizzleImageData(unsigned char* srcAddr,",
" size_t height,\n size_t bytesPerRow,",
" bool flipY) {\n if (flipY) {",
" for (size_t i = 0; i < height / 2; i++) {\n size_t topRowStartPosition = i * bytesPerRow;\n size_t bottomRowStartPosition = (height - 1 - i) * bytesPerRow;",
" if (kN32_SkColorType == kBGRA_8888_SkColorType) { // needs to swizzle",
" for (size_t j = 0; j < bytesPerRow; j += 4) {",
" std::swap(srcAddr[topRowStartPosition + j],\n srcAddr[bottomRowStartPosition + j + 2]);\n std::swap(srcAddr[topRowStartPosition + j + 1],\n srcAddr[bottomRowStartPosition + j + 1]);\n std::swap(srcAddr[topRowStartPosition + j + 2],\n srcAddr[bottomRowStartPosition + j]);\n std::swap(srcAddr[topRowStartPosition + j + 3],\n srcAddr[bottomRowStartPosition + j + 3]);\n }\n } else {\n std::swap_ranges(srcAddr + topRowStartPosition,\n srcAddr + topRowStartPosition + bytesPerRow,\n srcAddr + bottomRowStartPosition);\n }\n }\n } else {\n if (kN32_SkColorType == kBGRA_8888_SkColorType) // needs to swizzle",
" for (size_t i = 0; i < height * bytesPerRow; i += 4)",
" std::swap(srcAddr[i], srcAddr[i + 2]);\n }\n }"
] |
[
1,
0,
1,
0,
1,
0,
1,
0,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-5209",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-5209/",
"CWE ID": "CWE-787",
"codeLink": "https://github.com/chromium/chromium/commit/d59a4441697f6253e7dc3f7ae5caad6e5fd2c778",
"commit_id": "d59a4441697f6253e7dc3f7ae5caad6e5fd2c778",
"commit_message": "Prevent bad casting in ImageBitmap when calling ArrayBuffer::createOrNull\n\nCurrently when ImageBitmap's constructor is invoked, we check whether\ndstSize will overflow size_t or not. The problem comes when we call\nArrayBuffer::createOrNull some times in the code.\n\nBoth parameters of ArrayBuffer::createOrNull are unsigned. In ImageBitmap\nwhen we call this method, the first parameter is usually width * height.\nThis could overflow unsigned even if it has been checked safe with size_t,\nthe reason is that unsigned is a 32-bit value on 64-bit systems, while\nsize_t is a 64-bit value.\n\nThis CL makes a change such that we check whether the dstSize will overflow\nunsigned or not. In this case, we can guarantee that createOrNull will not have\nany crash.\n\nBUG=664139\n\nReview-Url: https://codereview.chromium.org/2500493002\nCr-Commit-Position: refs/heads/master@{#431936}",
"lang": "C",
"project": "Chrome"
}
| 13,342
|
Determine whether the code is vulnerable or not.
|
[
"static void swizzleImageData(unsigned char* srcAddr,",
" unsigned height,\n unsigned bytesPerRow,",
" bool flipY) {\n if (flipY) {",
" for (unsigned i = 0; i < height / 2; i++) {\n unsigned topRowStartPosition = i * bytesPerRow;\n unsigned bottomRowStartPosition = (height - 1 - i) * bytesPerRow;",
" if (kN32_SkColorType == kBGRA_8888_SkColorType) { // needs to swizzle",
" for (unsigned j = 0; j < bytesPerRow; j += 4) {",
" std::swap(srcAddr[topRowStartPosition + j],\n srcAddr[bottomRowStartPosition + j + 2]);\n std::swap(srcAddr[topRowStartPosition + j + 1],\n srcAddr[bottomRowStartPosition + j + 1]);\n std::swap(srcAddr[topRowStartPosition + j + 2],\n srcAddr[bottomRowStartPosition + j]);\n std::swap(srcAddr[topRowStartPosition + j + 3],\n srcAddr[bottomRowStartPosition + j + 3]);\n }\n } else {\n std::swap_ranges(srcAddr + topRowStartPosition,\n srcAddr + topRowStartPosition + bytesPerRow,\n srcAddr + bottomRowStartPosition);\n }\n }\n } else {\n if (kN32_SkColorType == kBGRA_8888_SkColorType) // needs to swizzle",
" for (unsigned i = 0; i < height * bytesPerRow; i += 4)",
" std::swap(srcAddr[i], srcAddr[i + 2]);\n }\n }"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-5209",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-5209/",
"CWE ID": "CWE-787",
"codeLink": "https://github.com/chromium/chromium/commit/d59a4441697f6253e7dc3f7ae5caad6e5fd2c778",
"commit_id": "d59a4441697f6253e7dc3f7ae5caad6e5fd2c778",
"commit_message": "Prevent bad casting in ImageBitmap when calling ArrayBuffer::createOrNull\n\nCurrently when ImageBitmap's constructor is invoked, we check whether\ndstSize will overflow size_t or not. The problem comes when we call\nArrayBuffer::createOrNull some times in the code.\n\nBoth parameters of ArrayBuffer::createOrNull are unsigned. In ImageBitmap\nwhen we call this method, the first parameter is usually width * height.\nThis could overflow unsigned even if it has been checked safe with size_t,\nthe reason is that unsigned is a 32-bit value on 64-bit systems, while\nsize_t is a 64-bit value.\n\nThis CL makes a change such that we check whether the dstSize will overflow\nunsigned or not. In this case, we can guarantee that createOrNull will not have\nany crash.\n\nBUG=664139\n\nReview-Url: https://codereview.chromium.org/2500493002\nCr-Commit-Position: refs/heads/master@{#431936}",
"lang": "C",
"project": "Chrome"
}
| 13,342
|
Determine whether the code is vulnerable or not.
|
[
"void Location::replace(LocalDOMWindow* current_window,\n LocalDOMWindow* entered_window,\n const USVStringOrTrustedURL& stringOrUrl,\n ExceptionState& exception_state) {\n String url = GetStringFromTrustedURL(stringOrUrl, current_window->document(),\n exception_state);\n if (!exception_state.HadException()) {\n SetLocation(url, current_window, entered_window, &exception_state,\n SetLocationPolicy::kReplaceThisFrame);\n }\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2019-5803",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2019-5803/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/chromium/chromium/commit/0e3b0c22a5c596bdc24a391b3f02952c1c3e4f1b",
"commit_id": "0e3b0c22a5c596bdc24a391b3f02952c1c3e4f1b",
"commit_message": "Check the source browsing context's CSP in Location::SetLocation prior to dispatching a navigation to a `javascript:` URL.\n\nMakes `javascript:` navigations via window.location.href compliant with\nhttps://html.spec.whatwg.org/#navigate, which states that the source\nbrowsing context must be checked (rather than the current browsing\ncontext).\n\nBug: 909865\nChange-Id: Id6aef6eef56865e164816c67eb9fe07ea1cb1b4e\nReviewed-on: https://chromium-review.googlesource.com/c/1359823\nReviewed-by: Andy Paicu <andypaicu@chromium.org>\nReviewed-by: Mike West <mkwst@chromium.org>\nCommit-Queue: Andrew Comminos <acomminos@fb.com>\nCr-Commit-Position: refs/heads/master@{#614451}",
"lang": "C",
"project": "Chrome"
}
| 13,346
|
Determine whether the code is vulnerable or not.
|
[
"void AutomationProvider::RemoveLoginHandler(NavigationController* tab) {\n DCHECK(login_handler_map_[tab]);\n login_handler_map_.erase(tab);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2011-1296",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2011-1296/",
"CWE ID": "CWE-20",
"codeLink": "https://github.com/chromium/chromium/commit/c90c6ca59378d7e86d1a2f28fe96bada35df1508",
"commit_id": "c90c6ca59378d7e86d1a2f28fe96bada35df1508",
"commit_message": "Rename the TabContentWrapper pieces to be \"TabHelper\"s. (Except for the PasswordManager... for now.) Also, just pre-create them up-front. It saves us effort, as they're all going to be eventually created anyway, so being lazy saves us nothing and creates headaches since the rules about what can be lazy differ from feature to feature.\n\nBUG=71097\nTEST=zero visible change\n\nReview URL: http://codereview.chromium.org/6480117\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@75170 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 13,349
|
Determine whether the code is vulnerable or not.
|
[
"static int btrfs_dentry_delete(const struct dentry *dentry)\n{\n\tstruct btrfs_root *root;\n\tstruct inode *inode = d_inode(dentry);",
"\tif (!inode && !IS_ROOT(dentry))\n\t\tinode = d_inode(dentry->d_parent);",
"\tif (inode) {\n\t\troot = BTRFS_I(inode)->root;\n\t\tif (btrfs_root_refs(&root->root_item) == 0)\n\t\t\treturn 1;",
"\t\tif (btrfs_ino(inode) == BTRFS_EMPTY_SUBVOL_DIR_OBJECTID)\n\t\t\treturn 1;\n\t}\n\treturn 0;\n}\n"
] |
[
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-8374",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-8374/",
"CWE ID": "CWE-200",
"codeLink": "https://github.com/torvalds/linux/commit/0305cd5f7fca85dae392b9ba85b116896eb7c1c7",
"commit_id": "0305cd5f7fca85dae392b9ba85b116896eb7c1c7",
"commit_message": "Btrfs: fix truncation of compressed and inlined extents\n\nWhen truncating a file to a smaller size which consists of an inline\nextent that is compressed, we did not discard (or made unusable) the\ndata between the new file size and the old file size, wasting metadata\nspace and allowing for the truncated data to be leaked and the data\ncorruption/loss mentioned below.\nWe were also not correctly decrementing the number of bytes used by the\ninode, we were setting it to zero, giving a wrong report for callers of\nthe stat(2) syscall. The fsck tool also reported an error about a mismatch\nbetween the nbytes of the file versus the real space used by the file.\n\nNow because we weren't discarding the truncated region of the file, it\nwas possible for a caller of the clone ioctl to actually read the data\nthat was truncated, allowing for a security breach without requiring root\naccess to the system, using only standard filesystem operations. The\nscenario is the following:\n\n 1) User A creates a file which consists of an inline and compressed\n extent with a size of 2000 bytes - the file is not accessible to\n any other users (no read, write or execution permission for anyone\n else);\n\n 2) The user truncates the file to a size of 1000 bytes;\n\n 3) User A makes the file world readable;\n\n 4) User B creates a file consisting of an inline extent of 2000 bytes;\n\n 5) User B issues a clone operation from user A's file into its own\n file (using a length argument of 0, clone the whole range);\n\n 6) User B now gets to see the 1000 bytes that user A truncated from\n its file before it made its file world readbale. User B also lost\n the bytes in the range [1000, 2000[ bytes from its own file, but\n that might be ok if his/her intention was reading stale data from\n user A that was never supposed to be public.\n\nNote that this contrasts with the case where we truncate a file from 2000\nbytes to 1000 bytes and then truncate it back from 1000 to 2000 bytes. In\nthis case reading any byte from the range [1000, 2000[ will return a value\nof 0x00, instead of the original data.\n\nThis problem exists since the clone ioctl was added and happens both with\nand without my recent data loss and file corruption fixes for the clone\nioctl (patch \"Btrfs: fix file corruption and data loss after cloning\ninline extents\").\n\nSo fix this by truncating the compressed inline extents as we do for the\nnon-compressed case, which involves decompressing, if the data isn't already\nin the page cache, compressing the truncated version of the extent, writing\nthe compressed content into the inline extent and then truncate it.\n\nThe following test case for fstests reproduces the problem. In order for\nthe test to pass both this fix and my previous fix for the clone ioctl\nthat forbids cloning a smaller inline extent into a larger one,\nwhich is titled \"Btrfs: fix file corruption and data loss after cloning\ninline extents\", are needed. Without that other fix the test fails in a\ndifferent way that does not leak the truncated data, instead part of\ndestination file gets replaced with zeroes (because the destination file\nhas a larger inline extent than the source).\n\n seq=`basename $0`\n seqres=$RESULT_DIR/$seq\n echo \"QA output created by $seq\"\n tmp=/tmp/$$\n status=1\t# failure is the default!\n trap \"_cleanup; exit \\$status\" 0 1 2 3 15\n\n _cleanup()\n {\n rm -f $tmp.*\n }\n\n # get standard environment, filters and checks\n . ./common/rc\n . ./common/filter\n\n # real QA test starts here\n _need_to_be_root\n _supported_fs btrfs\n _supported_os Linux\n _require_scratch\n _require_cloner\n\n rm -f $seqres.full\n\n _scratch_mkfs >>$seqres.full 2>&1\n _scratch_mount \"-o compress\"\n\n # Create our test files. File foo is going to be the source of a clone operation\n # and consists of a single inline extent with an uncompressed size of 512 bytes,\n # while file bar consists of a single inline extent with an uncompressed size of\n # 256 bytes. For our test's purpose, it's important that file bar has an inline\n # extent with a size smaller than foo's inline extent.\n $XFS_IO_PROG -f -c \"pwrite -S 0xa1 0 128\" \\\n -c \"pwrite -S 0x2a 128 384\" \\\n $SCRATCH_MNT/foo | _filter_xfs_io\n $XFS_IO_PROG -f -c \"pwrite -S 0xbb 0 256\" $SCRATCH_MNT/bar | _filter_xfs_io\n\n # Now durably persist all metadata and data. We do this to make sure that we get\n # on disk an inline extent with a size of 512 bytes for file foo.\n sync\n\n # Now truncate our file foo to a smaller size. Because it consists of a\n # compressed and inline extent, btrfs did not shrink the inline extent to the\n # new size (if the extent was not compressed, btrfs would shrink it to 128\n # bytes), it only updates the inode's i_size to 128 bytes.\n $XFS_IO_PROG -c \"truncate 128\" $SCRATCH_MNT/foo\n\n # Now clone foo's inline extent into bar.\n # This clone operation should fail with errno EOPNOTSUPP because the source\n # file consists only of an inline extent and the file's size is smaller than\n # the inline extent of the destination (128 bytes < 256 bytes). However the\n # clone ioctl was not prepared to deal with a file that has a size smaller\n # than the size of its inline extent (something that happens only for compressed\n # inline extents), resulting in copying the full inline extent from the source\n # file into the destination file.\n #\n # Note that btrfs' clone operation for inline extents consists of removing the\n # inline extent from the destination inode and copy the inline extent from the\n # source inode into the destination inode, meaning that if the destination\n # inode's inline extent is larger (N bytes) than the source inode's inline\n # extent (M bytes), some bytes (N - M bytes) will be lost from the destination\n # file. Btrfs could copy the source inline extent's data into the destination's\n # inline extent so that we would not lose any data, but that's currently not\n # done due to the complexity that would be needed to deal with such cases\n # (specially when one or both extents are compressed), returning EOPNOTSUPP, as\n # it's normally not a very common case to clone very small files (only case\n # where we get inline extents) and copying inline extents does not save any\n # space (unlike for normal, non-inlined extents).\n $CLONER_PROG -s 0 -d 0 -l 0 $SCRATCH_MNT/foo $SCRATCH_MNT/bar\n\n # Now because the above clone operation used to succeed, and due to foo's inline\n # extent not being shinked by the truncate operation, our file bar got the whole\n # inline extent copied from foo, making us lose the last 128 bytes from bar\n # which got replaced by the bytes in range [128, 256[ from foo before foo was\n # truncated - in other words, data loss from bar and being able to read old and\n # stale data from foo that should not be possible to read anymore through normal\n # filesystem operations. Contrast with the case where we truncate a file from a\n # size N to a smaller size M, truncate it back to size N and then read the range\n # [M, N[, we should always get the value 0x00 for all the bytes in that range.\n\n # We expected the clone operation to fail with errno EOPNOTSUPP and therefore\n # not modify our file's bar data/metadata. So its content should be 256 bytes\n # long with all bytes having the value 0xbb.\n #\n # Without the btrfs bug fix, the clone operation succeeded and resulted in\n # leaking truncated data from foo, the bytes that belonged to its range\n # [128, 256[, and losing data from bar in that same range. So reading the\n # file gave us the following content:\n #\n # 0000000 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1 a1\n # *\n # 0000200 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a\n # *\n # 0000400\n echo \"File bar's content after the clone operation:\"\n od -t x1 $SCRATCH_MNT/bar\n\n # Also because the foo's inline extent was not shrunk by the truncate\n # operation, btrfs' fsck, which is run by the fstests framework everytime a\n # test completes, failed reporting the following error:\n #\n # root 5 inode 257 errors 400, nbytes wrong\n\n status=0\n exit\n\nCc: stable@vger.kernel.org\nSigned-off-by: Filipe Manana <fdmanana@suse.com>",
"lang": "C",
"project": "linux"
}
| 13,359
|
Determine whether the code is vulnerable or not.
|
[
"static const char *xquote(const char *str, const char *quote_chars)\n{\n\tconst char *q = quote(str, quote_chars);\n\tif (q == NULL) {\n\t\tfprintf(stderr, \"%s: %s\\n\", progname, strerror(errno));\n\t\texit(1);\n\t}\n\treturn q;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2009-4411",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2009-4411/",
"CWE ID": "CWE-264",
"codeLink": "https://git.savannah.gnu.org/cgit/acl.git/commit/?id=63451a0",
"commit_id": "63451a06b7484d220750ed8574d3ee84e156daf5",
"commit_message": null,
"lang": "C",
"project": "savannah"
}
| 13,364
|
Determine whether the code is vulnerable or not.
|
[
"void FrameView::scheduleUpdateWidgetsIfNecessary()\n{\n ASSERT(!isInPerformLayout());\n if (m_updateWidgetsTimer.isActive() || m_widgetUpdateSet.isEmpty())\n return;\n m_updateWidgetsTimer.startOneShot(0, FROM_HERE);\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2014-3191",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2014-3191/",
"CWE ID": "CWE-416",
"codeLink": "https://github.com/chromium/chromium/commit/11a4cc4a6d6e665d9a118fada4b7c658d6f70d95",
"commit_id": "11a4cc4a6d6e665d9a118fada4b7c658d6f70d95",
"commit_message": "Defer call to updateWidgetPositions() outside of RenderLayerScrollableArea.\n\nupdateWidgetPositions() can destroy the render tree, so it should never\nbe called from inside RenderLayerScrollableArea. Leaving it there allows\nfor the potential of use-after-free bugs.\n\nBUG=402407\nR=vollick@chromium.org\n\nReview URL: https://codereview.chromium.org/490473003\n\ngit-svn-id: svn://svn.chromium.org/blink/trunk@180681 bbb929c8-8fbe-4397-9dbb-9b2b20218538",
"lang": "C",
"project": "Chrome"
}
| 13,369
|
Determine whether the code is vulnerable or not.
|
[
"int kvm_apic_compare_prio(struct kvm_vcpu *vcpu1, struct kvm_vcpu *vcpu2)\n{\n\treturn vcpu1->arch.apic_arb_prio - vcpu2->arch.apic_arb_prio;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-6376",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-6376/",
"CWE ID": "CWE-189",
"codeLink": "https://github.com/torvalds/linux/commit/17d68b763f09a9ce824ae23eb62c9efc57b69271",
"commit_id": "17d68b763f09a9ce824ae23eb62c9efc57b69271",
"commit_message": "KVM: x86: fix guest-initiated crash with x2apic (CVE-2013-6376)\n\nA guest can cause a BUG_ON() leading to a host kernel crash.\nWhen the guest writes to the ICR to request an IPI, while in x2apic\nmode the following things happen, the destination is read from\nICR2, which is a register that the guest can control.\n\nkvm_irq_delivery_to_apic_fast uses the high 16 bits of ICR2 as the\ncluster id. A BUG_ON is triggered, which is a protection against\naccessing map->logical_map with an out-of-bounds access and manages\nto avoid that anything really unsafe occurs.\n\nThe logic in the code is correct from real HW point of view. The problem\nis that KVM supports only one cluster with ID 0 in clustered mode, but\nthe code that has the bug does not take this into account.\n\nReported-by: Lars Bull <larsbull@google.com>\nCc: stable@vger.kernel.org\nSigned-off-by: Gleb Natapov <gleb@redhat.com>\nSigned-off-by: Paolo Bonzini <pbonzini@redhat.com>",
"lang": "C",
"project": "linux"
}
| 13,370
|
Determine whether the code is vulnerable or not.
|
[
"static void __nfs4_file_put_access(struct nfs4_file *fp, int oflag)\n{\n\tmight_lock(&fp->fi_lock);",
"\tif (atomic_dec_and_lock(&fp->fi_access[oflag], &fp->fi_lock)) {\n\t\tstruct file *f1 = NULL;\n\t\tstruct file *f2 = NULL;",
"\t\tswap(f1, fp->fi_fds[oflag]);\n\t\tif (atomic_read(&fp->fi_access[1 - oflag]) == 0)\n\t\t\tswap(f2, fp->fi_fds[O_RDWR]);\n\t\tspin_unlock(&fp->fi_lock);\n\t\tif (f1)\n\t\t\tfput(f1);\n\t\tif (f2)\n\t\t\tfput(f2);\n\t}\n}\n"
] |
[
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-9059",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-9059/",
"CWE ID": "CWE-404",
"codeLink": "https://github.com/torvalds/linux/commit/c70422f760c120480fee4de6c38804c72aa26bc1",
"commit_id": "c70422f760c120480fee4de6c38804c72aa26bc1",
"commit_message": "Merge tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux\n\nPull nfsd updates from Bruce Fields:\n \"Another RDMA update from Chuck Lever, and a bunch of miscellaneous\n bugfixes\"\n\n* tag 'nfsd-4.12' of git://linux-nfs.org/~bfields/linux: (26 commits)\n nfsd: Fix up the \"supattr_exclcreat\" attributes\n nfsd: encoders mustn't use unitialized values in error cases\n nfsd: fix undefined behavior in nfsd4_layout_verify\n lockd: fix lockd shutdown race\n NFSv4: Fix callback server shutdown\n SUNRPC: Refactor svc_set_num_threads()\n NFSv4.x/callback: Create the callback service through svc_create_pooled\n lockd: remove redundant check on block\n svcrdma: Clean out old XDR encoders\n svcrdma: Remove the req_map cache\n svcrdma: Remove unused RDMA Write completion handler\n svcrdma: Reduce size of sge array in struct svc_rdma_op_ctxt\n svcrdma: Clean up RPC-over-RDMA backchannel reply processing\n svcrdma: Report Write/Reply chunk overruns\n svcrdma: Clean up RDMA_ERROR path\n svcrdma: Use rdma_rw API in RPC reply path\n svcrdma: Introduce local rdma_rw API helpers\n svcrdma: Clean up svc_rdma_get_inv_rkey()\n svcrdma: Add helper to save pages under I/O\n svcrdma: Eliminate RPCRDMA_SQ_DEPTH_MULT\n ...",
"lang": "C",
"project": "linux"
}
| 13,372
|
Determine whether the code is vulnerable or not.
|
[
"int vhost_add_used(struct vhost_virtqueue *vq, unsigned int head, int len)\n{\n\tstruct vring_used_elem heads = {\n\t\tcpu_to_vhost32(vq, head),\n\t\tcpu_to_vhost32(vq, len)\n\t};",
"\treturn vhost_add_used_n(vq, &heads, 1);\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2015-6252",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2015-6252/",
"CWE ID": "CWE-399",
"codeLink": "https://github.com/torvalds/linux/commit/7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5",
"commit_id": "7932c0bd7740f4cd2aa168d3ce0199e7af7d72d5",
"commit_message": "vhost: actually track log eventfd file\n\nWhile reviewing vhost log code, I found out that log_file is never\nset. Note: I haven't tested the change (QEMU doesn't use LOG_FD yet).\n\nCc: stable@vger.kernel.org\nSigned-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\nSigned-off-by: Michael S. Tsirkin <mst@redhat.com>",
"lang": "C",
"project": "linux"
}
| 13,379
|
Determine whether the code is vulnerable or not.
|
[
" void EnableAllActions() {\n actions_.insert(MediaSessionAction::kPlay);\n actions_.insert(MediaSessionAction::kPause);\n actions_.insert(MediaSessionAction::kPreviousTrack);\n actions_.insert(MediaSessionAction::kNextTrack);\n actions_.insert(MediaSessionAction::kSeekBackward);\n actions_.insert(MediaSessionAction::kSeekForward);\n actions_.insert(MediaSessionAction::kStop);",
" NotifyUpdatedActions();\n }\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2017-5107",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2017-5107/",
"CWE ID": "CWE-200",
"codeLink": "https://github.com/chromium/chromium/commit/c25b198675380f713a56649c857b4367601d4a3d",
"commit_id": "c25b198675380f713a56649c857b4367601d4a3d",
"commit_message": "[Lock Screen Media Controls] Tweak UI based on new mocks\n\nThis CL rearranges the different components of the CrOS lock screen\nmedia controls based on the newest mocks. This involves resizing most\nof the child views and their spacings. The artwork was also resized\nand re-positioned. Additionally, the close button was moved from the\nmain view to the header row child view.\n\nArtist and title data about the current session will eventually be\nplaced to the right of the artwork, but right now this space is empty.\n\nSee the bug for before and after pictures.\n\nBug: 991647\nChange-Id: I7b97f31982ccf2912bd2564d5241bfd849d21d92\nReviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1746554\nReviewed-by: Xiyuan Xia <xiyuan@chromium.org>\nReviewed-by: Becca Hughes <beccahughes@chromium.org>\nCommit-Queue: Mia Bergeron <miaber@google.com>\nCr-Commit-Position: refs/heads/master@{#686253}",
"lang": "C",
"project": "Chrome"
}
| 13,385
|
Determine whether the code is vulnerable or not.
|
[
" static gboolean OnButtonPressReleaseEvent(\n GtkWidget* widget,\n GdkEventButton* event,\n RenderWidgetHostViewGtk* host_view) {\n TRACE_EVENT0(\"browser\",\n \"RenderWidgetHostViewGtkWidget::OnButtonPressReleaseEvent\");",
" if (event->type != GDK_BUTTON_RELEASE)\n host_view->set_last_mouse_down(event);",
" if (!(event->button == 1 || event->button == 2 || event->button == 3))\n return FALSE; // We do not forward any other buttons to the renderer.\n if (event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)\n return FALSE;",
" if (!gtk_widget_is_focus(widget))\n host_view->host_->OnPointerEventActivate();",
" if (event->type != GDK_BUTTON_RELEASE)\n host_view->im_context_->ConfirmComposition();",
" GtkWidget* event_widget = gtk_get_event_widget(\n reinterpret_cast<GdkEvent*>(event));\n if (event_widget != widget) {\n int x = 0;\n int y = 0;\n gtk_widget_get_pointer(widget, &x, &y);\n GtkAllocation allocation;\n gtk_widget_get_allocation(widget, &allocation);\n bool click_in_popup = x >= 0 && y >= 0 && x < allocation.width &&\n y < allocation.height;\n if (event->type != GDK_BUTTON_RELEASE && host_view->IsPopup() &&\n !host_view->is_popup_first_mouse_release_ && !click_in_popup) {\n host_view->host_->Shutdown();\n return FALSE;\n }\n event->x = x;\n event->y = y;\n }",
" if (event->type == GDK_BUTTON_PRESS && !gtk_widget_has_focus(widget))\n gtk_widget_grab_focus(widget);",
" host_view->is_popup_first_mouse_release_ = false;\n RenderWidgetHostImpl* widget_host =\n RenderWidgetHostImpl::From(host_view->GetRenderWidgetHost());\n if (widget_host)\n widget_host->ForwardMouseEvent(WebInputEventFactory::mouseEvent(event));",
" return FALSE;\n }\n"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-0886",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-0886/",
"CWE ID": null,
"codeLink": "https://github.com/chromium/chromium/commit/18d67244984a574ba2dd8779faabc0e3e34f4b76",
"commit_id": "18d67244984a574ba2dd8779faabc0e3e34f4b76",
"commit_message": "Implement TextureImageTransportSurface using texture mailbox\n\nThis has a couple of advantages:\n- allow tearing down and recreating the UI parent context without\nlosing the renderer contexts\n- do not require a context to be able to generate textures when\ncreating the GLSurfaceHandle\n- clearer ownership semantics that potentially allows for more\nrobust and easier lost context handling/thumbnailing/etc., since a texture is at\nany given time owned by either: UI parent, mailbox, or\nTextureImageTransportSurface\n- simplify frontbuffer protection logic;\nthe frontbuffer textures are now owned by RWHV where they are refcounted\n\nThe TextureImageTransportSurface informs RenderWidgetHostView of the\nmailbox names for the front- and backbuffer textures by\nassociating them with a surface_handle (1 or 2) in the AcceleratedSurfaceNew message.\nDuring SwapBuffers() or PostSubBuffer() cycles, it then uses \nproduceTextureCHROMIUM() and consumeTextureCHROMIUM()\nto transfer ownership between renderer and browser compositor.\n\nRWHV sends back the surface_handle of the buffer being returned with the Swap ACK\n(or 0 if no buffer is being returned in which case TextureImageTransportSurface will\nallocate a new texture - note that this could be used to \nsimply keep textures for thumbnailing).\n\nBUG=154815,139616\nTBR=sky@chromium.org\n\nReview URL: https://chromiumcodereview.appspot.com/11194042\n\ngit-svn-id: svn://svn.chromium.org/chrome/trunk/src@171569 0039d316-1c4b-4281-b951-d872f2087c98",
"lang": "C",
"project": "Chrome"
}
| 13,386
|
Determine whether the code is vulnerable or not.
|
[
"asocket* create_local_socket(int fd) {\n asocket* s = reinterpret_cast<asocket*>(calloc(1, sizeof(asocket)));\n if (s == NULL) {\n fatal(\"cannot allocate socket\");\n }\n s->fd = fd;\n s->enqueue = local_socket_enqueue;\n s->ready = local_socket_ready;\n s->shutdown = NULL;\n s->close = local_socket_close;\n install_local_socket(s);",
" fdevent_install(&s->fde, fd, local_socket_event_func, s);\n D(\"LS(%d): created (fd=%d)\", s->id, s->fd);\n return s;\n}\n"
] |
[
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-3890",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-3890/",
"CWE ID": "CWE-264",
"codeLink": "https://android.googlesource.com/platform/system/core/+/014b01706cc64dc9c2ad94a96f62e07c058d0b5d",
"commit_id": "014b01706cc64dc9c2ad94a96f62e07c058d0b5d",
"commit_message": "adb: use asocket's close function when closing.\n\nclose_all_sockets was assuming that all registered local sockets used\nlocal_socket_close as their close function. However, this is not true\nfor JDWP sockets.\n\nBug: http://b/28347842\nChange-Id: I40a1174845cd33f15f30ce70828a7081cd5a087e\n(cherry picked from commit 53eb31d87cb84a4212f4850bf745646e1fb12814)\n",
"lang": "C",
"project": "Android"
}
| 13,388
|
Determine whether the code is vulnerable or not.
|
[
"struct crypto_alg *crypto_mod_get(struct crypto_alg *alg)\n{\n\treturn try_module_get(alg->cra_module) ? crypto_alg_get(alg) : NULL;\n}\n"
] |
[
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2013-7421",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2013-7421/",
"CWE ID": "CWE-264",
"codeLink": "https://github.com/torvalds/linux/commit/5d26a105b5a73e5635eae0629b42fa0a90e07b7b",
"commit_id": "5d26a105b5a73e5635eae0629b42fa0a90e07b7b",
"commit_message": "crypto: prefix module autoloading with \"crypto-\"\n\nThis prefixes all crypto module loading with \"crypto-\" so we never run\nthe risk of exposing module auto-loading to userspace via a crypto API,\nas demonstrated by Mathias Krause:\n\nhttps://lkml.org/lkml/2013/3/4/70\n\nSigned-off-by: Kees Cook <keescook@chromium.org>\nSigned-off-by: Herbert Xu <herbert@gondor.apana.org.au>",
"lang": "C",
"project": "linux"
}
| 13,392
|
Determine whether the code is vulnerable or not.
|
[
"int Effect_command(effect_handle_t self,\n uint32_t cmdCode,\n uint32_t cmdSize,\n void *pCmdData,\n uint32_t *replySize,\n void *pReplyData){\n EffectContext * pContext = (EffectContext *) self;\n int retsize;",
"\n if(pContext->EffectType == LVM_BASS_BOOST){\n }\n if(pContext->EffectType == LVM_VIRTUALIZER){\n }\n if(pContext->EffectType == LVM_EQUALIZER){\n }\n if(pContext->EffectType == LVM_VOLUME){\n }",
" if (pContext == NULL){\n ALOGV(\"\\tLVM_ERROR : Effect_command ERROR pContext == NULL\");\n return -EINVAL;\n }",
"",
"\n switch (cmdCode){\n case EFFECT_CMD_INIT:\n if (pReplyData == NULL || replySize == NULL || *replySize != sizeof(int)){\n ALOGV(\"\\tLVM_ERROR, EFFECT_CMD_INIT: ERROR for effect type %d\",\n pContext->EffectType);\n return -EINVAL;\n }\n *(int *) pReplyData = 0;\n if(pContext->EffectType == LVM_BASS_BOOST){\n android::BassSetStrength(pContext, 0);\n }\n if(pContext->EffectType == LVM_VIRTUALIZER){\n android::VirtualizerSetStrength(pContext, 0);\n }\n if(pContext->EffectType == LVM_EQUALIZER){\n android::EqualizerSetPreset(pContext, 0);\n }\n if(pContext->EffectType == LVM_VOLUME){\n *(int *) pReplyData = android::VolumeSetVolumeLevel(pContext, 0);\n }\n break;",
" case EFFECT_CMD_SET_CONFIG:\n if (pCmdData == NULL || cmdSize != sizeof(effect_config_t) ||\n pReplyData == NULL || replySize == NULL || *replySize != sizeof(int)) {\n ALOGV(\"\\tLVM_ERROR : Effect_command cmdCode Case: \"\n \"EFFECT_CMD_SET_CONFIG: ERROR\");\n return -EINVAL;\n }\n *(int *) pReplyData = android::Effect_setConfig(pContext, (effect_config_t *) pCmdData);\n break;",
" case EFFECT_CMD_GET_CONFIG:\n if (pReplyData == NULL || replySize == NULL || *replySize != sizeof(effect_config_t)) {\n ALOGV(\"\\tLVM_ERROR : Effect_command cmdCode Case: \"\n \"EFFECT_CMD_GET_CONFIG: ERROR\");\n return -EINVAL;\n }",
" android::Effect_getConfig(pContext, (effect_config_t *)pReplyData);\n break;",
" case EFFECT_CMD_RESET:\n android::Effect_setConfig(pContext, &pContext->config);\n break;",
" case EFFECT_CMD_GET_PARAM:{",
" \n effect_param_t *p = (effect_param_t *)pCmdData;",
"",
" if (pCmdData == NULL || cmdSize < sizeof(effect_param_t) ||\n cmdSize < (sizeof(effect_param_t) + p->psize) ||\n pReplyData == NULL || replySize == NULL ||\n *replySize < (sizeof(effect_param_t) + p->psize)) {\n ALOGV(\"\\tLVM_ERROR : EFFECT_CMD_GET_PARAM: ERROR\");\n return -EINVAL;\n }",
" memcpy(pReplyData, pCmdData, sizeof(effect_param_t) + p->psize);",
" p = (effect_param_t *)pReplyData;",
" int voffset = ((p->psize - 1) / sizeof(int32_t) + 1) * sizeof(int32_t);",
" if(pContext->EffectType == LVM_BASS_BOOST){\n p->status = android::BassBoost_getParameter(pContext,\n p->data,\n (size_t *)&p->vsize,\n p->data + voffset);\n }",
" if(pContext->EffectType == LVM_VIRTUALIZER){\n p->status = android::Virtualizer_getParameter(pContext,\n (void *)p->data,\n (size_t *)&p->vsize,\n p->data + voffset);",
" }\n if(pContext->EffectType == LVM_EQUALIZER){\n p->status = android::Equalizer_getParameter(pContext,\n p->data,\n &p->vsize,\n p->data + voffset);",
" }\n if(pContext->EffectType == LVM_VOLUME){\n p->status = android::Volume_getParameter(pContext,\n (void *)p->data,\n (size_t *)&p->vsize,\n p->data + voffset);",
" }\n *replySize = sizeof(effect_param_t) + voffset + p->vsize;",
" } break;\n case EFFECT_CMD_SET_PARAM:{\n if(pContext->EffectType == LVM_BASS_BOOST){",
" if (pCmdData == NULL ||\n cmdSize != (sizeof(effect_param_t) + sizeof(int32_t) +sizeof(int16_t)) ||\n pReplyData == NULL || replySize == NULL || *replySize != sizeof(int32_t)) {\n ALOGV(\"\\tLVM_ERROR : BassBoost_command cmdCode Case: \"\n \"EFFECT_CMD_SET_PARAM: ERROR\");\n return -EINVAL;\n }\n effect_param_t *p = (effect_param_t *) pCmdData;",
" if (p->psize != sizeof(int32_t)){\n ALOGV(\"\\tLVM_ERROR : BassBoost_command cmdCode Case: \"\n \"EFFECT_CMD_SET_PARAM: ERROR, psize is not sizeof(int32_t)\");\n return -EINVAL;\n }",
"\n *(int *)pReplyData = android::BassBoost_setParameter(pContext,\n (void *)p->data,\n p->data + p->psize);\n }\n if(pContext->EffectType == LVM_VIRTUALIZER){",
" if (pCmdData == NULL ||\n cmdSize > (sizeof(effect_param_t) + sizeof(int32_t) +sizeof(int32_t)) ||\n cmdSize < (sizeof(effect_param_t) + sizeof(int32_t) +sizeof(int16_t)) ||\n pReplyData == NULL || replySize == NULL || *replySize != sizeof(int32_t)) {\n ALOGV(\"\\tLVM_ERROR : Virtualizer_command cmdCode Case: \"\n \"EFFECT_CMD_SET_PARAM: ERROR\");\n return -EINVAL;\n }\n effect_param_t *p = (effect_param_t *) pCmdData;",
" if (p->psize != sizeof(int32_t)){\n ALOGV(\"\\tLVM_ERROR : Virtualizer_command cmdCode Case: \"\n \"EFFECT_CMD_SET_PARAM: ERROR, psize is not sizeof(int32_t)\");\n return -EINVAL;\n }",
"\n *(int *)pReplyData = android::Virtualizer_setParameter(pContext,\n (void *)p->data,\n p->data + p->psize);\n }\n if(pContext->EffectType == LVM_EQUALIZER){",
" if (pCmdData == NULL || cmdSize < (sizeof(effect_param_t) + sizeof(int32_t)) ||\n pReplyData == NULL || replySize == NULL || *replySize != sizeof(int32_t)) {\n ALOGV(\"\\tLVM_ERROR : Equalizer_command cmdCode Case: \"\n \"EFFECT_CMD_SET_PARAM: ERROR\");\n return -EINVAL;\n }\n effect_param_t *p = (effect_param_t *) pCmdData;",
" *(int *)pReplyData = android::Equalizer_setParameter(pContext,\n (void *)p->data,\n p->data + p->psize);\n }\n if(pContext->EffectType == LVM_VOLUME){",
" if (pCmdData == NULL ||\n cmdSize < (sizeof(effect_param_t) + sizeof(int32_t)) ||\n pReplyData == NULL || replySize == NULL ||\n *replySize != sizeof(int32_t)) {\n ALOGV(\"\\tLVM_ERROR : Volume_command cmdCode Case: \"\n \"EFFECT_CMD_SET_PARAM: ERROR\");\n return -EINVAL;\n }\n effect_param_t *p = (effect_param_t *) pCmdData;",
" *(int *)pReplyData = android::Volume_setParameter(pContext,\n (void *)p->data,\n p->data + p->psize);\n }\n } break;",
" case EFFECT_CMD_ENABLE:\n ALOGV(\"\\tEffect_command cmdCode Case: EFFECT_CMD_ENABLE start\");\n if (pReplyData == NULL || replySize == NULL || *replySize != sizeof(int)) {\n ALOGV(\"\\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_ENABLE: ERROR\");\n return -EINVAL;\n }",
" *(int *)pReplyData = android::Effect_setEnabled(pContext, LVM_TRUE);\n break;",
" case EFFECT_CMD_DISABLE:\n if (pReplyData == NULL || replySize == NULL || *replySize != sizeof(int)) {\n ALOGV(\"\\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_DISABLE: ERROR\");\n return -EINVAL;\n }\n *(int *)pReplyData = android::Effect_setEnabled(pContext, LVM_FALSE);\n break;",
" case EFFECT_CMD_SET_DEVICE:\n {\n ALOGV(\"\\tEffect_command cmdCode Case: EFFECT_CMD_SET_DEVICE start\");\n if (pCmdData == NULL){\n ALOGV(\"\\tLVM_ERROR : Effect_command cmdCode Case: EFFECT_CMD_SET_DEVICE: ERROR\");\n return -EINVAL;\n }",
" uint32_t device = *(uint32_t *)pCmdData;",
" if (pContext->EffectType == LVM_BASS_BOOST) {\n if((device == AUDIO_DEVICE_OUT_SPEAKER) ||\n (device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT) ||\n (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)){\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE device is invalid for LVM_BASS_BOOST %d\",\n *(int32_t *)pCmdData);\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE temporary disable LVM_BAS_BOOST\");",
"\n if (pContext->pBundledContext->bBassEnabled == LVM_TRUE) {\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE disable LVM_BASS_BOOST %d\",\n *(int32_t *)pCmdData);\n android::LvmEffect_disable(pContext);\n }\n pContext->pBundledContext->bBassTempDisabled = LVM_TRUE;\n } else {\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE device is valid for LVM_BASS_BOOST %d\",\n *(int32_t *)pCmdData);",
"\n if (pContext->pBundledContext->bBassEnabled == LVM_TRUE) {\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE re-enable LVM_BASS_BOOST %d\",\n *(int32_t *)pCmdData);\n android::LvmEffect_enable(pContext);\n }\n pContext->pBundledContext->bBassTempDisabled = LVM_FALSE;\n }\n }\n if (pContext->EffectType == LVM_VIRTUALIZER) {\n if((device == AUDIO_DEVICE_OUT_SPEAKER)||\n (device == AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT)||\n (device == AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER)){\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE device is invalid for LVM_VIRTUALIZER %d\",\n *(int32_t *)pCmdData);\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE temporary disable LVM_VIRTUALIZER\");",
"\n if (pContext->pBundledContext->bVirtualizerEnabled == LVM_TRUE) {\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE disable LVM_VIRTUALIZER %d\",\n *(int32_t *)pCmdData);\n android::LvmEffect_disable(pContext);\n }\n pContext->pBundledContext->bVirtualizerTempDisabled = LVM_TRUE;\n } else {\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE device is valid for LVM_VIRTUALIZER %d\",\n *(int32_t *)pCmdData);",
"\n if(pContext->pBundledContext->bVirtualizerEnabled == LVM_TRUE){\n ALOGV(\"\\tEFFECT_CMD_SET_DEVICE re-enable LVM_VIRTUALIZER %d\",\n *(int32_t *)pCmdData);\n android::LvmEffect_enable(pContext);\n }\n pContext->pBundledContext->bVirtualizerTempDisabled = LVM_FALSE;\n }\n }\n ALOGV(\"\\tEffect_command cmdCode Case: EFFECT_CMD_SET_DEVICE end\");\n break;\n }\n case EFFECT_CMD_SET_VOLUME:\n {\n uint32_t leftVolume, rightVolume;\n int16_t leftdB, rightdB;\n int16_t maxdB, pandB;\n int32_t vol_ret[2] = {1<<24,1<<24}; // Apply no volume\n int status = 0;\n LVM_ControlParams_t ActiveParams; /* Current control Parameters */\n LVM_ReturnStatus_en LvmStatus=LVM_SUCCESS; /* Function call status */",
" if(pReplyData == LVM_NULL){\n break;\n }",
" if (pCmdData == NULL || cmdSize != 2 * sizeof(uint32_t) || pReplyData == NULL ||\n replySize == NULL || *replySize < 2*sizeof(int32_t)) {\n ALOGV(\"\\tLVM_ERROR : Effect_command cmdCode Case: \"\n \"EFFECT_CMD_SET_VOLUME: ERROR\");\n return -EINVAL;\n }",
" leftVolume = ((*(uint32_t *)pCmdData));\n rightVolume = ((*((uint32_t *)pCmdData + 1)));",
" if(leftVolume == 0x1000000){\n leftVolume -= 1;\n }\n if(rightVolume == 0x1000000){\n rightVolume -= 1;\n }",
" leftdB = android::LVC_Convert_VolToDb(leftVolume);\n rightdB = android::LVC_Convert_VolToDb(rightVolume);",
" pandB = rightdB - leftdB;",
" maxdB = leftdB;\n if(rightdB > maxdB){\n maxdB = rightdB;\n }",
" memcpy(pReplyData, vol_ret, sizeof(int32_t)*2);\n android::VolumeSetVolumeLevel(pContext, (int16_t)(maxdB*100));",
" /* Get the current settings */\n LvmStatus =LVM_GetControlParameters(pContext->pBundledContext->hInstance,&ActiveParams);\n LVM_ERROR_CHECK(LvmStatus, \"LVM_GetControlParameters\", \"VolumeSetStereoPosition\")\n if(LvmStatus != LVM_SUCCESS) return -EINVAL;",
" /* Volume parameters */\n ActiveParams.VC_Balance = pandB;\n ALOGV(\"\\t\\tVolumeSetStereoPosition() (-96dB -> +96dB)-> %d\\n\", ActiveParams.VC_Balance );",
" /* Activate the initial settings */\n LvmStatus =LVM_SetControlParameters(pContext->pBundledContext->hInstance,&ActiveParams);\n LVM_ERROR_CHECK(LvmStatus, \"LVM_SetControlParameters\", \"VolumeSetStereoPosition\")\n if(LvmStatus != LVM_SUCCESS) return -EINVAL;\n break;\n }\n case EFFECT_CMD_SET_AUDIO_MODE:\n break;\n default:\n return -EINVAL;\n }",
" return 0;\n} /* end Effect_command */"
] |
[
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
BIGVUL
|
{
"CVE ID": "CVE-2016-0827",
"CVE Page": "https://www.cvedetails.com/cve/CVE-2016-0827/",
"CWE ID": "CWE-189",
"codeLink": "https://android.googlesource.com/platform/frameworks/av/+/9e29523b9537983b4c4b205ff868d0b3bca0383b",
"commit_id": "9e29523b9537983b4c4b205ff868d0b3bca0383b",
"commit_message": "fix possible overflow in effect wrappers.\n\nAdd checks on parameter size field in effect command handlers\nto avoid overflow leading to invalid comparison with min allowed\nsize for command and reply buffers.\n\nBug: 26347509.\nChange-Id: I20e6a9b6de8e5172b957caa1ac9410b9752efa4d\n(cherry picked from commit ad1bd92a49d78df6bc6e75bee68c517c1326f3cf)\n",
"lang": "C",
"project": "Android"
}
| 13,393
|
End of preview. Expand
in Data Studio
README.md exists but content is empty.
- Downloads last month
- 2