func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
virDomainObjParseFile(const char *filename,
virDomainXMLOptionPtr xmlopt,
unsigned int flags)
{
xmlDocPtr xml;
virDomainObjPtr obj = NULL;
int keepBlanksDefault = xmlKeepBlanksDefault(0);
if ((xml = virXMLParseFile(filename))) {
obj = virDomainObjPars... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 177,482,087,624,266,630,000,000,000,000,000,000,000 | 17 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
com_delimiter(String *buffer __attribute__((unused)), char *line)
{
char buff[256], *tmp;
strmake_buf(buff, line);
tmp= get_arg(buff, 0);
if (!tmp || !*tmp)
{
put_info("DELIMITER must be followed by a 'delimiter' character or string",
INFO_ERROR);
return 0;
}
else
{
if (strstr(tmp, "... | 1 | [] | server | 383007c75d6ef5043fa5781956a6a02b24e2b79e | 241,412,517,587,515,820,000,000,000,000,000,000,000 | 26 | mysql cli: fix USE command quoting
* use proper sql quoting rules for USE, while preserving
as much of historical behavior as possible
* short commands (\u) behave as before |
bitfromint4(PG_FUNCTION_ARGS)
{
int32 a = PG_GETARG_INT32(0);
int32 typmod = PG_GETARG_INT32(1);
VarBit *result;
bits8 *r;
int rlen;
int destbitsleft,
srcbitsleft;
if (typmod <= 0)
typmod = 1; /* default bit length */
rlen = VARBITTOTALLEN(typmod);
result = (VarBit *) palloc(rlen);
SET_... | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 161,263,457,619,097,900,000,000,000,000,000,000,000 | 53 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
bool IsSubDelim(int c) {
switch (c) {
case '!':
case '$':
case '&':
case '\'':
case '(':
case ')':
case '*':
case '+':
case ',':
case ';':
case '=':
return true;
default:
return false;
}
} | 0 | [
"CWE-22"
] | webcc | 55a45fd5039061d5cc62e9f1b9d1f7e97a15143f | 150,296,836,870,636,800,000,000,000,000,000,000,000 | 18 | fix static file serving security issue; fix url path encoding issue |
static int mem_open(struct inode *inode, struct file *file)
{
int ret = __mem_open(inode, file, PTRACE_MODE_ATTACH);
/* OK to pass negative loff_t, we can catch out-of-range */
file->f_mode |= FMODE_UNSIGNED_OFFSET;
return ret;
} | 0 | [
"CWE-362"
] | linux | 8148a73c9901a8794a50f950083c00ccf97d43b3 | 270,928,128,536,421,250,000,000,000,000,000,000,000 | 9 | proc: prevent accessing /proc/<PID>/environ until it's ready
If /proc/<PID>/environ gets read before the envp[] array is fully set up
in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to
read more bytes than are actually written, as env_start will already be
set but env_end will still be zero, makin... |
parse_copy_decompress(sldns_buffer* pkt, struct msg_parse* msg,
struct reply_info* rep, struct regional* region)
{
size_t i;
struct rrset_parse *pset = msg->rrset_first;
struct packed_rrset_data* data;
log_assert(rep);
rep->ttl = MAX_TTL;
rep->security = sec_status_unchecked;
if(rep->rrset_count == 0)
rep->tt... | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 127,772,730,844,104,580,000,000,000,000,000,000,000 | 26 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
static void qemu_net_client_destructor(NetClientState *nc)
{
g_free(nc);
} | 0 | [
"CWE-190"
] | qemu | 25c01bd19d0e4b66f357618aeefda1ef7a41e21a | 15,578,467,886,290,036,000,000,000,000,000,000,000 | 4 | net: drop too large packet early
We try to detect and drop too large packet (>INT_MAX) in 1592a9947036
("net: ignore packet size greater than INT_MAX") during packet
delivering. Unfortunately, this is not sufficient as we may hit
another integer overflow when trying to queue such large packet in
qemu_net_queue_append_... |
static void __exit aac_exit(void)
{
if (aac_cfg_major > -1)
unregister_chrdev(aac_cfg_major, "aac");
pci_unregister_driver(&aac_pci_driver);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | f856567b930dfcdbc3323261bf77240ccdde01f5 | 206,989,633,968,170,500,000,000,000,000,000,000,000 | 6 | aacraid: missing capable() check in compat ioctl
In commit d496f94d22d1 ('[SCSI] aacraid: fix security weakness') we
added a check on CAP_SYS_RAWIO to the ioctl. The compat ioctls need the
check as well.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torv... |
FLAC__bool FLAC__bitreader_read_raw_uint64(FLAC__BitReader *br, FLAC__uint64 *val, uint32_t bits)
{
FLAC__uint32 hi, lo;
if(bits > 32) {
if(!FLAC__bitreader_read_raw_uint32(br, &hi, bits-32))
return false;
if(!FLAC__bitreader_read_raw_uint32(br, &lo, 32))
return false;
*val = hi;
*val <<= 32;
*val |=... | 0 | [
"CWE-125"
] | flac | 2e7931c27eb15e387da440a37f12437e35b22dd4 | 159,543,401,831,331,380,000,000,000,000,000,000,000 | 20 | libFLAC/bitreader.c: Fix out-of-bounds read
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069
Testcase: fuzzer_decoder-5670265022840832 |
parser_parse_function_arguments (parser_context_t *context_p, /**< context */
lexer_token_type_t end_type) /**< expected end type */
{
JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_FUNCTION);
#if JERRY_ESNEXT
JERRY_ASSERT (context_p->status_flags & PARSER_IS_FU... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 209,513,232,247,968,700,000,000,000,000,000,000,000 | 358 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
static void sctp_assoc_bh_rcv(struct work_struct *work)
{
struct sctp_association *asoc =
container_of(work, struct sctp_association,
base.inqueue.immediate);
struct net *net = sock_net(asoc->base.sk);
struct sctp_endpoint *ep;
struct sctp_chunk *chunk;
struct sctp_inq *inqueue;
int state;
sctp_subtype... | 0 | [
"CWE-20",
"CWE-241"
] | linux | d3217b15a19a4779c39b212358a5c71d725822ee | 200,741,940,719,072,130,000,000,000,000,000,000,000 | 63 | sctp: Fix sk_ack_backlog wrap-around problem
Consider the scenario:
For a TCP-style socket, while processing the COOKIE_ECHO chunk in
sctp_sf_do_5_1D_ce(), after it has passed a series of sanity check,
a new association would be created in sctp_unpack_cookie(), but afterwards,
some processing maybe failed, and sctp_as... |
static unsigned long list_count(struct list_head *list)
{
struct list_head *pos;
unsigned long count = 0;
list_for_each(pos, list)
count++;
return count;
} | 0 | [
"CWE-20",
"CWE-190"
] | linux | c784e5249e773689e38d2bc1749f08b986621a26 | 124,696,337,013,057,150,000,000,000,000,000,000,000 | 10 | drm/i915/guc: Update to use firmware v49.0.1
The latest GuC firmware includes a number of interface changes that
require driver updates to match.
* Starting from Gen11, the ID to be provided to GuC needs to contain
the engine class in bits [0..2] and the instance in bits [3..6].
NOTE: this patch breaks pointer d... |
MONGO_EXPORT void bson_swap_endian32( void *outp, const void *inp ) {
const char *in = ( const char * )inp;
char *out = ( char * )outp;
out[0] = in[3];
out[1] = in[2];
out[2] = in[1];
out[3] = in[0];
} | 0 | [
"CWE-190"
] | mongo-c-driver-legacy | 1a1f5e26a4309480d88598913f9eebf9e9cba8ca | 247,268,130,741,676,680,000,000,000,000,000,000,000 | 9 | don't mix up int and size_t (first pass to fix that) |
encoding_table_get_name_core(table, enc, error_mode)
VALUE table;
VALUE enc;
VALUE error_mode;
{
volatile VALUE name = Qnil;
enc = rb_funcallv(enc, ID_to_s, 0, 0);
name = rb_hash_lookup(table, enc);
if (!NIL_P(name)) {
/* find */
return name;
}
/* update check */
if (update_encod... | 0 | [] | tk | ebd0fc80d62eeb7b8556522256f8d035e013eb65 | 337,161,354,129,926,370,000,000,000,000,000,000,000 | 32 | tcltklib.c: check argument
* ext/tk/tcltklib.c (ip_cancel_eval_core): check argument type and
length.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static void check_page_contents(int pageno, QPDFObjectHandle page)
{
PointerHolder<Buffer> buf =
page.getKey("/Contents").getStreamData();
std::string actual_contents =
std::string(reinterpret_cast<char *>(buf->getBuffer()),
buf->getSize());
std::string expected_contents ... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 138,376,041,662,525,830,000,000,000,000,000,000,000 | 16 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static void rtl_usb_cleanup(struct ieee80211_hw *hw)
{
u32 i;
struct sk_buff *_skb;
struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
struct ieee80211_tx_info *txinfo;
/* clean up rx stuff. */
_rtl_usb_cleanup_rx(hw);
/* clean up tx stuff */
for (i = 0; i < RTL_USB_MAX_EP_NUM; i++) {
while ((_skb = skb_... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 3f93616951138a598d930dcaec40f2bfd9ce43bb | 205,595,291,480,175,430,000,000,000,000,000,000,000 | 23 | rtlwifi: prevent memory leak in rtl_usb_probe
In rtl_usb_probe if allocation for usb_data fails the allocated hw
should be released. In addition the allocated rtlpriv->usb_data should
be released on error handling path.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeau... |
TRIO_CONST char* trio_get_format TRIO_ARGS1((ref), trio_pointer_t ref)
{
#if TRIO_FEATURE_USER_DEFINED
assert(((trio_reference_t*)ref)->parameter->type == FORMAT_USER_DEFINED);
#endif
return (((trio_reference_t*)ref)->parameter->user_data);
} | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 323,616,478,359,738,250,000,000,000,000,000,000,000 | 8 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
int perf_config(config_fn_t fn, void *data)
{
int ret = 0, found = 0;
const char *home = NULL;
/* Setting $PERF_CONFIG makes perf read _only_ the given config file. */
if (config_exclusive_filename)
return perf_config_from_file(fn, config_exclusive_filename, data);
if (perf_config_system() && !access(perf_etc_p... | 0 | [
"CWE-94"
] | linux | aba8d056078e47350d85b06a9cabd5afcc4b72ea | 45,250,447,959,437,900,000,000,000,000,000,000,000 | 28 | perf tools: do not look at ./config for configuration
In addition to /etc/perfconfig and $HOME/.perfconfig, perf looks for
configuration in the file ./config, imitating git which looks at
$GIT_DIR/config. If ./config is not a perf configuration file, it
fails, or worse, treats it as a configuration file and changes b... |
int mg_http_upload(struct mg_connection *c, struct mg_http_message *hm,
const char *dir) {
char offset[40] = "", name[200] = "", path[256];
mg_http_get_var(&hm->query, "offset", offset, sizeof(offset));
mg_http_get_var(&hm->query, "name", name, sizeof(name));
if (name[0] == '\0') {
mg_htt... | 0 | [
"CWE-552"
] | mongoose | c65c8fdaaa257e0487ab0aaae9e8f6b439335945 | 234,014,042,689,326,470,000,000,000,000,000,000,000 | 25 | Protect against the directory traversal in mg_upload() |
static void scsi_aio_complete(void *opaque, int ret)
{
SCSIDiskReq *r = (SCSIDiskReq *)opaque;
SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, r->req.dev);
assert(r->req.aiocb != NULL);
r->req.aiocb = NULL;
aio_context_acquire(blk_get_aio_context(s->qdev.conf.blk));
if (scsi_disk_req_check_er... | 0 | [
"CWE-193"
] | qemu | b3af7fdf9cc537f8f0dd3e2423d83f5c99a457e8 | 259,392,169,287,833,030,000,000,000,000,000,000,000 | 19 | hw/scsi/scsi-disk: MODE_PAGE_ALLS not allowed in MODE SELECT commands
This avoids an off-by-one read of 'mode_sense_valid' buffer in
hw/scsi/scsi-disk.c:mode_sense_page().
Fixes: CVE-2021-3930
Cc: qemu-stable@nongnu.org
Reported-by: Alexander Bulekov <alxndr@bu.edu>
Fixes: a8f4bbe2900 ("scsi-disk: store valid mode pa... |
qf_msg(qf_info_T *qi, int which, char *lead)
{
char *title = (char *)qi->qf_lists[which].qf_title;
int count = qi->qf_lists[which].qf_count;
char_u buf[IOSIZE];
vim_snprintf((char *)buf, IOSIZE, _("%serror list %d of %d; %d errors "),
lead,
which + 1,
qi->qf_listcount,
count);
... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 41,414,501,144,414,934,000,000,000,000,000,000,000 | 26 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
list_to_parameters_foreach (GAppInfo *application,
GList *files,
GList **ret)
{
ApplicationLaunchParameters *parameters;
files = g_list_reverse (files);
parameters = application_launch_parameters_new
(application, files);
*ret = g_list_prepend (*ret, parameters);
} | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 26,148,763,561,244,803,000,000,000,000,000,000,000 | 12 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
std::size_t SnappyMessageCompressor::getMaxCompressedSize(size_t inputSize) {
// Testing has shown that snappy typically requests two additional bytes of buffer space when
// compressing beyond what snappy::MaxCompressedLength returns. So by padding this by 2 more
// bytes, we can avoid additional allocatio... | 0 | [] | mongo | 5ad69b851801edadbfde8fdf271f4ba7c21170b5 | 217,432,071,464,330,300,000,000,000,000,000,000,000 | 6 | SERVER-31273 Use Source/Sink version of snappy functions
(cherry picked from commit 59ead734faa8aa51f0c53bf2bd39d0a0247ddf99) |
rsvg_acquire_gvfs_data (const char *uri,
const char *base_uri,
char **out_mime_type,
gsize *out_len,
GCancellable *cancellable,
GError **error)
{
GFile *base, *file;
GError *err;
gchar *da... | 0 | [
"CWE-20"
] | librsvg | f01aded72c38f0e18bc7ff67dee800e380251c8e | 222,143,329,514,287,950,000,000,000,000,000,000,000 | 47 | io: Implement strict load policy
Allow any file to load from data:, and any resource to load from other
resources. Only allow file: to load other file: URIs from below the path
of the base file. Any other loads are denied.
Bug #691708. |
bash_complete_username (ignore, ignore2)
int ignore, ignore2;
{
return bash_complete_username_internal (rl_completion_mode (bash_complete_username));
} | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 256,480,967,387,259,470,000,000,000,000,000,000,000 | 5 | Bash-4.4 patch 7 |
static int rename_node(struct fuse *f, fuse_ino_t olddir, const char *oldname,
fuse_ino_t newdir, const char *newname, int hide)
{
struct node *node;
struct node *newnode;
int err = 0;
pthread_mutex_lock(&f->lock);
node = lookup_node(f, olddir, oldname);
newnode = look... | 0 | [] | ntfs-3g | fb28eef6f1c26170566187c1ab7dc913a13ea43c | 319,102,070,285,863,930,000,000,000,000,000,000,000 | 35 | Hardened the checking of directory offset requested by a readdir
When asked for the next directory entries, make sure the chunk offset
is within valid values, otherwise return no more entries in chunk. |
void rose_start_hbtimer(struct sock *sk)
{
struct rose_sock *rose = rose_sk(sk);
del_timer(&rose->timer);
rose->timer.function = rose_timer_expiry;
rose->timer.expires = jiffies + rose->hb;
add_timer(&rose->timer);
} | 1 | [
"CWE-416"
] | linux | 9cc02ede696272c5271a401e4f27c262359bc2f6 | 141,990,148,497,629,670,000,000,000,000,000,000,000 | 11 | net: rose: fix UAF bugs caused by timer handler
There are UAF bugs in rose_heartbeat_expiry(), rose_timer_expiry()
and rose_idletimer_expiry(). The root cause is that del_timer()
could not stop the timer handler that is running and the refcount
of sock is not managed properly.
One of the UAF bugs is shown below:
... |
int yr_re_finalize(void)
{
yr_thread_storage_destroy(&thread_storage_key);
thread_storage_key = 0;
return ERROR_SUCCESS;
} | 0 | [
"CWE-125"
] | yara | 83d799804648c2a0895d40a19835d9b757c6fa4e | 101,213,079,029,768,030,000,000,000,000,000,000,000 | 7 | Fix issue #646 (#648)
* Fix issue #646 and some edge cases with wide regexps using \b and \B
* Rename function IS_WORD_CHAR to _yr_re_is_word_char |
static void transit(h2_session *session, const char *action, h2_session_state nstate)
{
if (session->state != nstate) {
int loglvl = APLOG_DEBUG;
if ((session->state == H2_SESSION_ST_BUSY && nstate == H2_SESSION_ST_WAIT)
|| (session->state == H2_SESSION_ST_WAIT && nstate == H2_SESSION_ST... | 1 | [] | mod_h2 | 5e75e5685dd043fe93a5a08a15edd087a43f6968 | 257,105,353,967,304,530,000,000,000,000,000,000,000 | 29 | v1.11.0
--------------------------------------------------------------------------------
* connection IO event handling reworked. Instead of reacting on incoming bytes, the
state machine now acts on incoming frames that are affecting it. This reduces
state transitions.
* pytest suite now covers some basic tests... |
virtual GBool useFillColorStop() { return gTrue; } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 152,797,613,574,393,720,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
static int harmonize_features(struct sk_buff *skb, __be16 protocol, int features)
{
if (!can_checksum_protocol(features, protocol)) {
features &= ~NETIF_F_ALL_CSUM;
features &= ~NETIF_F_SG;
} else if (illegal_highdma(skb->dev, skb)) {
features &= ~NETIF_F_SG;
}
return features;
} | 0 | [
"CWE-264"
] | linux | 8909c9ad8ff03611c9c96c9a92656213e4bb495b | 208,630,560,114,524,330,000,000,000,000,000,000,000 | 11 | net: don't allow CAP_NET_ADMIN to load non-netdev kernel modules
Since a8f80e8ff94ecba629542d9b4b5f5a8ee3eb565c any process with
CAP_NET_ADMIN may load any module from /lib/modules/. This doesn't mean
that CAP_NET_ADMIN is a superset of CAP_SYS_MODULE as modules are
limited to /lib/modules/**. However, CAP_NET_ADMIN... |
static int domain_init(struct dmar_domain *domain, struct intel_iommu *iommu,
int guest_width)
{
int adjust_width, agaw;
unsigned long sagaw;
int err;
init_iova_domain(&domain->iovad, VTD_PAGE_SIZE, IOVA_START_PFN);
err = init_iova_flush_queue(&domain->iovad,
iommu_flush_iova, iova_entry_free);
... | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 226,601,214,480,182,930,000,000,000,000,000,000,000 | 56 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
static void vrend_destroy_shader_selector(struct vrend_shader_selector *sel)
{
struct vrend_shader *p = sel->current, *c;
unsigned i;
while (p) {
c = p->next_variant;
vrend_shader_destroy(p);
p = c;
}
if (sel->sinfo.so_names)
for (i = 0; i < sel->sinfo.so_info.num_outputs; i++)
... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 321,277,499,652,780,500,000,000,000,000,000,000,000 | 19 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
ace2type(struct nfs4_ace *ace)
{
switch (ace->whotype) {
case NFS4_ACL_WHO_NAMED:
return (ace->flag & NFS4_ACE_IDENTIFIER_GROUP ?
ACL_GROUP : ACL_USER);
case NFS4_ACL_WHO_OWNER:
return ACL_USER_OBJ;
case NFS4_ACL_WHO_GROUP:
return ACL_GROUP_OBJ;
case NFS4_ACL_WHO_EVERYONE:
return ACL_OTHER;
}... | 0 | [
"CWE-119"
] | linux-2.6 | 91b80969ba466ba4b915a4a1d03add8c297add3f | 277,553,485,250,731,460,000,000,000,000,000,000,000 | 16 | nfsd: fix buffer overrun decoding NFSv4 acl
The array we kmalloc() here is not large enough.
Thanks to Johann Dahm and David Richter for bug report and testing.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Cc: David Richter <richterd@citi.umich.edu>
Tested-by: Johann Dahm <jdahm@umich.edu> |
static UINT rdpei_send_pdu(RDPEI_CHANNEL_CALLBACK* callback, wStream* s, UINT16 eventId,
UINT32 pduLength)
{
UINT status;
Stream_SetPosition(s, 0);
Stream_Write_UINT16(s, eventId); /* eventId (2 bytes) */
Stream_Write_UINT32(s, pduLength); /* pduLength (4 bytes) */
Stream_SetPosition(s... | 0 | [
"CWE-125"
] | FreeRDP | 6b485b146a1b9d6ce72dfd7b5f36456c166e7a16 | 242,371,771,230,169,200,000,000,000,000,000,000,000 | 17 | Fixed oob read in irp_write and similar |
sleep_on_common(wait_queue_head_t *q, int state, long timeout)
{
unsigned long flags;
wait_queue_t wait;
init_waitqueue_entry(&wait, current);
__set_current_state(state);
spin_lock_irqsave(&q->lock, flags);
__add_wait_queue(q, &wait);
spin_unlock(&q->lock);
timeout = schedule_timeout(timeout);
spin_lock_irq... | 0 | [] | linux-2.6 | 8f1bc385cfbab474db6c27b5af1e439614f3025c | 71,501,067,355,669,740,000,000,000,000,000,000,000 | 19 | sched: fair: weight calculations
In order to level the hierarchy, we need to calculate load based on the
root view. That is, each task's load is in the same unit.
A
/ \
B 1
/ \
2 3
To compute 1's load we do:
weight(1)
--------------
rq_weight(A)
To ... |
static inline int16_t pre_blur2_func(int16_t p2, int16_t p1, int16_t z0,
int16_t n1, int16_t n2)
{
/*
return (1 * p2 + 4 * p1 + 6 * z0 + 4 * n1 + 1 * n2 + 8) >> 4;
*/
uint16_t r1 = ((uint16_t)(((uint16_t)(p2 + n2) >> 1) + z0) >> 1) + z0;
uint16_t r2 = p1 + n1;
... | 0 | [
"CWE-119",
"CWE-787"
] | libass | 08e754612019ed84d1db0d1fc4f5798248decd75 | 170,080,313,750,459,570,000,000,000,000,000,000,000 | 11 | Fix blur coefficient calculation buffer overflow
Found by fuzzer test case id:000082,sig:11,src:002579,op:havoc,rep:8.
Correctness should be checked, but this fixes the overflow for good. |
cgiCheckVariables(const char *names) /* I - Variables to look for */
{
char name[255], /* Current variable name */
*s; /* Pointer in string */
const char *val; /* Value of variable */
int element; /* Array element number */
if (names == NULL)
return (1);
while (*names != '\0')
{
while (... | 0 | [] | cups | b9ff93ce913ff633a3f667317e5a81fa7fe0d5d3 | 192,169,175,505,525,850,000,000,000,000,000,000,000 | 41 | CVE-2018-4700: Linux session cookies used a predictable random number seed. |
yang_check_leaf(struct lys_module *module, struct lys_node_leaf *leaf, int options, struct unres_schema *unres)
{
if (yang_fill_type(module, &leaf->type, (struct yang_type *)leaf->type.der, leaf, unres)) {
yang_type_free(module->ctx, &leaf->type);
goto error;
}
if (yang_check_iffeatures(modu... | 0 | [
"CWE-415"
] | libyang | d9feacc4a590d35dbc1af21caf9080008b4450ed | 30,769,496,578,147,440,000,000,000,000,000,000,000 | 46 | yang parser BUGFIX double free
Fixes #742 |
int32_t cli_bcapi_pdf_lookupobj(struct cli_bc_ctx *ctx , uint32_t objid)
{
unsigned i;
if (!ctx->pdf_phase)
return -1;
for (i=0;i<ctx->pdf_nobjs;i++) {
if (ctx->pdf_objs[i].id == objid)
return i;
}
return -1;
} | 0 | [
"CWE-189"
] | clamav-devel | 3d664817f6ef833a17414a4ecea42004c35cc42f | 27,541,914,140,019,588,000,000,000,000,000,000,000 | 11 | fix recursion level crash (bb #3706).
Thanks to Stephane Chazelas for the analysis. |
bind_array_variable (name, ind, value, flags)
char *name;
arrayind_t ind;
char *value;
int flags;
{
SHELL_VAR *entry;
entry = find_shell_variable (name);
if (entry == (SHELL_VAR *) 0)
{
/* Is NAME a nameref variable that points to an unset variable? */
entry = find_variable_n... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 166,752,593,664,958,710,000,000,000,000,000,000,000 | 33 | bash-4.4-rc2 release |
save_type(PicklerObject *self, PyObject *obj)
{
if (obj == (PyObject *)&_PyNone_Type) {
return save_singleton_type(self, obj, Py_None);
}
else if (obj == (PyObject *)&PyEllipsis_Type) {
return save_singleton_type(self, obj, Py_Ellipsis);
}
else if (obj == (PyObject *)&_PyNotImplement... | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 216,682,623,006,021,040,000,000,000,000,000,000,000 | 13 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
NTSTATUS samdb_result_passwords(TALLOC_CTX *mem_ctx,
struct loadparm_context *lp_ctx,
const struct ldb_message *msg,
struct samr_Password **nt_pwd)
{
uint16_t acct_flags;
acct_flags = samdb_result_acct_flags(msg,
"msDS-User-Account-Control-Computed");
/* Quit if the account was locked out. */
... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 230,658,039,066,082,160,000,000,000,000,000,000,000 | 19 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
static uint16_t tls1_get_group_id(EVP_PKEY *pkey)
{
int curve_nid = evp_pkey_get_EC_KEY_curve_nid(pkey);
if (curve_nid == NID_undef)
return 0;
return tls1_nid2group_id(curve_nid);
} | 0 | [
"CWE-476"
] | openssl | a87f3fe01a5a894aa27ccd6a239155fd129988e4 | 15,231,302,930,622,313,000,000,000,000,000,000,000 | 8 | Fix NULL dereference in SSL_check_chain() for TLS 1.3
In the tls1_check_sig_alg() helper function, we loop through the list of
"signature_algorithms_cert" values received from the client and attempt
to look up each one in turn in our internal table that maps wire
codepoint to string-form name, digest and/or signature ... |
static xmlNodePtr to_xml_gday(encodeTypePtr type, zval *data, int style, xmlNodePtr parent TSRMLS_DC)
{
return to_xml_datetime_ex(type, data, "---%d", style, parent TSRMLS_CC);
} | 0 | [
"CWE-19"
] | php-src | c8eaca013a3922e8383def6158ece2b63f6ec483 | 68,810,217,283,247,820,000,000,000,000,000,000,000 | 4 | Added type checks |
static ssize_t lbs_host_sleep_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
struct lbs_private *priv = file->private_data;
ssize_t ret;
size_t pos = 0;
unsigned long addr = get_zeroed_page(GFP_KERNEL);
char *buf = (char *)addr;
if (!buf)
return -ENOMEM;
pos += snprintf(buf,... | 0 | [
"CWE-703",
"CWE-189"
] | linux | a497e47d4aec37aaf8f13509f3ef3d1f6a717d88 | 68,226,218,070,835,820,000,000,000,000,000,000,000 | 18 | libertas: potential oops in debugfs
If we do a zero size allocation then it will oops. Also we can't be
sure the user passes us a NUL terminated string so I've added a
terminator.
This code can only be triggered by root.
Reported-by: Nico Golde <nico@ngolde.de>
Reported-by: Fabian Yamaguchi <fabs@goesec.de>
Signed-... |
ews_store_find_public_folder (CamelEwsStore *ews_store,
const gchar *folder_name)
{
EEwsFolder *folder = NULL;
GSList *piter;
gchar **folders;
gint ii;
g_return_val_if_fail (CAMEL_IS_EWS_STORE (ews_store), NULL);
g_return_val_if_fail (folder_name != NULL, NULL);
folders = g_strsplit (folder_name, "/",... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 147,705,795,046,127,380,000,000,000,000,000,000,000 | 58 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static struct inode *btrfs_iget_locked(struct super_block *s,
struct btrfs_key *location,
struct btrfs_root *root)
{
struct inode *inode;
struct btrfs_iget_args args;
unsigned long hashval = btrfs_inode_hash(location->objectid, root);
args.location = location;
args.root = root;
inode = ige... | 0 | [
"CWE-200"
] | linux | 0305cd5f7fca85dae392b9ba85b116896eb7c1c7 | 1,151,805,638,578,345,900,000,000,000,000,000,000 | 16 | Btrfs: fix truncation of compressed and inlined extents
When truncating a file to a smaller size which consists of an inline
extent that is compressed, we did not discard (or made unusable) the
data between the new file size and the old file size, wasting metadata
space and allowing for the truncated data to be leaked... |
uncompress_image(Gif_Context *gfc, Gif_Image *gfi, Gif_Reader *grr)
{
int old_nerrors;
if (!Gif_CreateUncompressedImage(gfi, gfi->interlace))
return 0;
gfc->width = gfi->width;
gfc->height = gfi->height;
gfc->image = gfi->image_data;
gfc->maximage = gfi->image_data + (unsigned) gfi->widt... | 0 | [
"CWE-416"
] | gifsicle | 81fd7823f6d9c85ab598bc850e40382068361185 | 295,522,340,897,782,630,000,000,000,000,000,000,000 | 14 | Fix use-after-free problems reported in #114. |
HttpTransact::handle_internal_request(State* /* s ATS_UNUSED */, HTTPHdr* incoming_hdr)
{
URL *url;
ink_assert(incoming_hdr->type_get() == HTTP_TYPE_REQUEST);
if (incoming_hdr->method_get_wksidx() != HTTP_WKSIDX_GET) {
return false;
}
url = incoming_hdr->url_get();
int scheme = url->scheme_get_wksid... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 65,680,144,676,415,420,000,000,000,000,000,000,000 | 23 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
megasas_wait_for_adapter_operational(struct megasas_instance *instance)
{
int wait_time = MEGASAS_RESET_WAIT_TIME * 2;
int i;
u8 adp_state;
for (i = 0; i < wait_time; i++) {
adp_state = atomic_read(&instance->adprecovery);
if ((adp_state == MEGASAS_HBA_OPERATIONAL) ||
(adp_state == MEGASAS_HW_CRITICAL_ER... | 0 | [
"CWE-476"
] | linux | bcf3b67d16a4c8ffae0aa79de5853435e683945c | 99,180,585,354,845,640,000,000,000,000,000,000,000 | 27 | scsi: megaraid_sas: return error when create DMA pool failed
when create DMA pool for cmd frames failed, we should return -ENOMEM,
instead of 0.
In some case in:
megasas_init_adapter_fusion()
-->megasas_alloc_cmds()
-->megasas_create_frame_pool
create DMA pool failed,
--> megasas_fre... |
PHP_FUNCTION(mb_ereg_search_getpos)
{
RETVAL_LONG(MBREX(search_pos));
} | 0 | [
"CWE-415"
] | php-src | 5b597a2e5b28e2d5a52fc1be13f425f08f47cb62 | 256,651,806,423,955,100,000,000,000,000,000,000,000 | 4 | Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free |
SYSCALL_DEFINE4(request_key, const char __user *, _type,
const char __user *, _description,
const char __user *, _callout_info,
key_serial_t, destringid)
{
struct key_type *ktype;
struct key *key;
key_ref_t dest_ref;
size_t callout_len;
char type[32], *description, *callout_info;
long ret;
/* pull the typ... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 67,598,838,598,619,000,000,000,000,000,000,000,000 | 78 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
UDate PersianCalendar::defaultCenturyStart() const {
// lazy-evaluate systemDefaultCenturyStart
umtx_initOnce(gSystemDefaultCenturyInit, &initializeSystemDefaultCentury);
return gSystemDefaultCenturyStart;
} | 0 | [
"CWE-190"
] | icu | 71dd84d4ffd6600a70e5bca56a22b957e6642bd4 | 313,695,530,765,983,800,000,000,000,000,000,000,000 | 5 | ICU-12504 in ICU4C Persian cal, use int64_t math for one operation to avoid overflow; add tests in C and J
X-SVN-Rev: 40654 |
ZEND_VM_HANDLER(192, ZEND_GET_CALLED_CLASS, UNUSED, UNUSED)
{
USE_OPLINE
if (Z_TYPE(EX(This)) == IS_OBJECT) {
ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_OBJCE(EX(This))->name);
} else if (Z_CE(EX(This))) {
ZVAL_STR_COPY(EX_VAR(opline->result.var), Z_CE(EX(This))->name);
} else {
ZVAL_FALSE(EX_VAR(opline->re... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 67,664,227,996,608,230,000,000,000,000,000,000,000 | 18 | Fix #73122: Integer Overflow when concatenating strings
We must avoid integer overflows in memory allocations, so we introduce
an additional check in the VM, and bail out in the rare case of an
overflow. Since the recent fix for bug #74960 still doesn't catch all
possible overflows, we fix that right away. |
CImg<T>& draw_triangle(CImg<tz>& zbuffer,
int x0, int y0, const float z0,
int x1, int y1, const float z1,
int x2, int y2, const float z2,
const tc *const color,
const CImg<tl>& ligh... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 254,820,811,812,845,400,000,000,000,000,000,000,000 | 96 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
void replace_nonprintable_char(int ifd, char *comment)
{
int i;
/* Read comment */
sa_fread(ifd, comment, MAX_COMMENT_LEN, HARD_SIZE, UEOF_STOP);
comment[MAX_COMMENT_LEN - 1] = '\0';
/* Replace non printable chars */
for (i = 0; i < strlen(comment); i++) {
if (!isprint(comment[i]))
comment[i] = '.';
}
} | 0 | [
"CWE-125"
] | sysstat | fbc691eaaa10d0bcea6741d5a223dc3906106548 | 284,785,866,856,587,240,000,000,000,000,000,000,000 | 14 | Fix #196 and #199: Out of bound reads security issues
Check args before calling memmove() and memset() in remap_struct()
function to avoid out of bound reads which would possibly lead to
unknown code execution and/or sadf command crash.
Signed-off-by: Sebastien GODARD <sysstat@users.noreply.github.com> |
static int ZEND_FASTCALL ZEND_SR_SPEC_TMP_CV_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
shift_right_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
_get_zval_ptr_cv(&opline->op2, EX(Ts), BP_VAR_R TSRMLS_CC... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 181,596,352,818,545,900,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
void Gfx::opXObject(Object args[], int numArgs) {
char *name;
Object obj1, obj2, obj3, refObj;
#if OPI_SUPPORT
Object opiDict;
#endif
name = args[0].getName();
if (!res->lookupXObject(name, &obj1)) {
return;
}
if (!obj1.isStream()) {
error(getPos(), "XObject '%s' is wrong type", name);
obj1.f... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 326,486,228,990,307,620,000,000,000,000,000,000,000 | 70 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
TEST_F(HttpConnectionManagerImplTest, RequestTimeoutDisabledIfSetToZero) {
request_timeout_ = std::chrono::milliseconds(0);
setup(false, "");
EXPECT_CALL(*codec_, dispatch(_)).WillOnce(Invoke([&](Buffer::Instance&) -> Http::Status {
EXPECT_CALL(filter_callbacks_.connection_.dispatcher_, createTimer_).Times(0... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 117,775,703,701,744,790,000,000,000,000,000,000,000 | 14 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
yang_dnode_xpath_get_canon(const struct lyd_node *dnode, const char *xpath_fmt,
va_list ap)
{
const struct lyd_node_term *__dleaf =
(const struct lyd_node_term *)dnode;
assert(__dleaf);
if (xpath_fmt) {
char __xpath[XPATH_MAXLEN];
vsnprintf(__xpath, sizeof(__xpath), xpath_fmt, ap);
__dleaf = (const str... | 0 | [
"CWE-119",
"CWE-787"
] | frr | ac3133450de12ba86c051265fc0f1b12bc57b40c | 193,628,299,859,699,850,000,000,000,000,000,000,000 | 15 | isisd: fix #10505 using base64 encoding
Using base64 instead of the raw string to encode
the binary data.
Signed-off-by: whichbug <whichbug@github.com> |
CallResult<bool> JSObject::getOwnComputedDescriptor(
Handle<JSObject> selfHandle,
Runtime *runtime,
Handle<> nameValHandle,
ComputedPropertyDescriptor &desc,
MutableHandle<> &valueOrAccessor) {
auto converted = toPropertyKeyIfObject(runtime, nameValHandle);
if (LLVM_UNLIKELY(converted == Executi... | 0 | [
"CWE-843",
"CWE-125"
] | hermes | fe52854cdf6725c2eaa9e125995da76e6ceb27da | 279,418,699,571,086,060,000,000,000,000,000,000,000 | 29 | [CVE-2020-1911] Look up HostObject computed properties on the right object in the prototype chain.
Summary:
The change in the hermes repository fixes the security vulnerability
CVE-2020-1911. This vulnerability only affects applications which
allow evaluation of uncontrolled, untrusted JavaScript code not
shipped wit... |
static inline struct list_head *ptype_head(const struct packet_type *pt)
{
if (pt->type == htons(ETH_P_ALL))
return &ptype_all;
else
return &ptype_base[ntohs(pt->type) & PTYPE_HASH_MASK];
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 105,339,447,303,794,600,000,000,000,000,000,000,000 | 7 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
int (*X509_TRUST_set_default(int (*trust) (int, X509 *, int))) (int, X509 *,
int) {
int (*oldtrust) (int, X509 *, int);
oldtrust = default_trust;
default_trust = trust;
return oldtrust;
} | 0 | [] | openssl | 33cc5dde478ba5ad79f8fd4acd8737f0e60e236e | 102,601,767,360,307,960,000,000,000,000,000,000,000 | 7 | Compat self-signed trust with reject-only aux data
When auxiliary data contains only reject entries, continue to trust
self-signed objects just as when no auxiliary data is present.
This makes it possible to reject specific uses without changing
what's accepted (and thus overring the underlying EKU).
Added new suppo... |
isis_print_mt_port_cap_subtlv(netdissect_options *ndo,
const uint8_t *tptr, int len)
{
int stlv_type, stlv_len;
const struct isis_subtlv_spb_mcid *subtlv_spb_mcid;
int i;
while (len > 2)
{
ND_TCHECK2(*tptr, 2);
stlv_type = *(tptr++);
stlv_len = *(tptr++);
/* fi... | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | b20e1639dbac84b3fcb393858521c13ad47a9d70 | 36,814,404,690,329,070,000,000,000,000,000,000,000 | 118 | CVE-2017-13026/IS-IS: Clean up processing of subTLVs.
Add bounds checks, do a common check to make sure we captured the entire
subTLV, add checks to make sure the subTLV fits within the TLV.
This fixes a buffer over-read discovered by Bhargava Shastry,
SecT/TU Berlin.
Add tests using the capture files supplied by th... |
setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
sigset_t *set, struct pt_regs *regs, int in_syscall)
{
struct rt_sigframe __user *frame;
unsigned long rp, usp;
unsigned long haddr, sigframe_size;
int err = 0;
#ifdef CONFIG_64BIT
compat_int_t compat_val;
struct compat_rt_sigframe __user * ... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 97,597,401,086,738,110,000,000,000,000,000,000,000 | 202 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
Pl_LZWDecoder::finish()
{
getNext()->finish();
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 187,314,910,873,841,540,000,000,000,000,000,000,000 | 4 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static struct mfc6_cache *ip6mr_cache_alloc(void)
{
struct mfc6_cache *c = kmem_cache_zalloc(mrt_cachep, GFP_KERNEL);
if (!c)
return NULL;
c->mfc_un.res.last_assert = jiffies - MFC_ASSERT_THRESH - 1;
c->mfc_un.res.minvif = MAXMIFS;
return c;
} | 0 | [
"CWE-20"
] | linux | 99253eb750fda6a644d5188fb26c43bad8d5a745 | 324,098,326,431,386,950,000,000,000,000,000,000,000 | 9 | ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt
Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed
the issue for ipv4 ipmr:
ip_mroute_setsockopt() & ip_mroute_getsockopt() should not
access/set raw_sk(sk)->ipmr_table before making sure the socket
is a raw socket, and prot... |
gen12_emit_fini_breadcrumb_rcs(struct i915_request *request, u32 *cs)
{
cs = gen8_emit_ggtt_write_rcs(cs,
request->fence.seqno,
i915_request_active_timeline(request)->hwsp_offset,
PIPE_CONTROL_CS_STALL |
PIPE_CONTROL_TILE_CACHE_FLUSH |
PIPE_CONTROL_RENDER_TARGET_CACHE_... | 0 | [] | linux | bc8a76a152c5f9ef3b48104154a65a68a8b76946 | 117,203,994,317,388,050,000,000,000,000,000,000,000 | 17 | drm/i915/gen9: Clear residual context state on context switch
Intel ID: PSIRT-TA-201910-001
CVEID: CVE-2019-14615
Intel GPU Hardware prior to Gen11 does not clear EU state
during a context switch. This can result in information
leakage between contexts.
For Gen8 and Gen9, hardware provides a mechanism for
fast clear... |
XML_Parse(XML_Parser parser, const char *s, int len, int isFinal) {
if ((parser == NULL) || (len < 0) || ((s == NULL) && (len != 0))) {
if (parser != NULL)
parser->m_errorCode = XML_ERROR_INVALID_ARGUMENT;
return XML_STATUS_ERROR;
}
switch (parser->m_parsingStatus.parsing) {
case XML_SUSPENDED:
... | 0 | [
"CWE-400",
"CWE-703"
] | libexpat | 9b4ce651b26557f16103c3a366c91934ecd439ab | 101,305,063,617,093,450,000,000,000,000,000,000,000 | 152 | Prevent stack exhaustion in build_model
It is possible to trigger stack exhaustion in build_model function if
depth of nested children in DTD element is large enough. This happens
because build_node is a recursively called function within build_model.
The code has been adjusted to run iteratively. It uses the already... |
static void jsR_dumpenvironment(js_State *J, js_Environment *E, int d)
{
printf("scope %d ", d);
js_dumpobject(J, E->variables);
if (E->outer)
jsR_dumpenvironment(J, E->outer, d+1);
} | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 272,354,192,149,295,270,000,000,000,000,000,000,000 | 7 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
static u16 lg4ff_identify_multimode_wheel(struct hid_device *hid, const u16 reported_product_id, const u16 bcdDevice)
{
u32 current_mode;
int i;
/* identify current mode from USB PID */
for (i = 1; i < ARRAY_SIZE(lg4ff_alternate_modes); i++) {
dbg_hid("Testing whether PID is %X\n", lg4ff_alternate_modes[i].produ... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 233,924,708,822,285,340,000,000,000,000,000,000,000 | 34 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
static GF_Err SD_DumpDOMElement(GF_SceneDumper *sdump, GF_DOMFullNode *node)
{
const char *ns;
u32 child_type = 0;
GF_DOMFullAttribute *att;
GF_ChildNodeItem *child;
GF_DOMText *txt;
ns = gf_sg_get_namespace_qname(node->sgprivate->scenegraph, node->ns);
DUMP_IND(sdump);
if (ns) gf_fprintf(sdump->trace, "<%s:%s... | 0 | [
"CWE-476"
] | gpac | 0102c5d4db7fdbf08b5b591b2a6264de33867a07 | 283,248,391,589,265,020,000,000,000,000,000,000,000 | 56 | fixed #2232 |
TEST_P(
QuicServerTransportPendingDataTest,
TestNoCipherProcessPendingZeroRttData) {
server->getNonConstConn().qLogger =
std::make_shared<quic::FileQLogger>(VantagePoint::Server);
recvClientHello(false);
auto data = IOBuf::copyBuffer("bad data");
StreamId streamId = 2;
// Write packet with zero ... | 0 | [
"CWE-617",
"CWE-703"
] | mvfst | a67083ff4b8dcbb7ee2839da6338032030d712b0 | 58,795,197,852,240,010,000,000,000,000,000,000,000 | 36 | Close connection if we derive an extra 1-rtt write cipher
Summary: Fixes CVE-2021-24029
Reviewed By: mjoras, lnicco
Differential Revision: D26613890
fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945 |
asn1_der_decoding2 (asn1_node *element, const void *ider, int *max_ider_len,
unsigned int flags, char *errorDescription)
{
asn1_node node, p, p2, p3;
char temp[128];
int counter, len2, len3, len4, move, ris, tlen;
asn1_node ptail = NULL;
unsigned char class;
unsigned long tag;
int tag_len;
int ind... | 0 | [
"CWE-119"
] | libtasn1 | f979435823a02f842c41d49cd41cc81f25b5d677 | 146,163,341,729,881,100,000,000,000,000,000,000,000 | 598 | _asn1_extract_der_octet: prevent past of boundary access
Reported by Hanno Böck. |
static int expandrow(UINT8* dest, UINT8* src, int n, int z, int xsize)
{
UINT8 pixel, count;
for (;n > 0; n--)
{
pixel = *src++;
if (n == 1 && pixel != 0)
return n;
count = pixel & RLE_MAX_RUN;
if (!count)
return count;
if (count > xsize) {
... | 0 | [
"CWE-120",
"CWE-787"
] | Pillow | a79b65c47c7dc6fe623aadf09aa6192fc54548f3 | 3,839,441,082,606,326,700,000,000,000,000,000,000 | 33 | Catch SGI buffer overruns |
static void handle_swbp(struct pt_regs *regs)
{
struct uprobe *uprobe;
unsigned long bp_vaddr;
int uninitialized_var(is_swbp);
bp_vaddr = uprobe_get_swbp_addr(regs);
if (bp_vaddr == get_trampoline_vaddr())
return handle_trampoline(regs);
uprobe = find_active_uprobe(bp_vaddr, &is_swbp);
if (!uprobe) {
if (i... | 0 | [
"CWE-416"
] | linux | 355627f518978b5167256d27492fe0b343aaf2f2 | 60,182,645,775,082,020,000,000,000,000,000,000,000 | 60 | mm, uprobes: fix multiple free of ->uprobes_state.xol_area
Commit 7c051267931a ("mm, fork: make dup_mmap wait for mmap_sem for
write killable") made it possible to kill a forking task while it is
waiting to acquire its ->mmap_sem for write, in dup_mmap().
However, it was overlooked that this introduced an new error p... |
PHP_FUNCTION(imagewebp)
{
_php_image_output_ctx(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_GDIMG_TYPE_WEBP, "WEBP", gdImageWebpCtx);
} | 0 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 2,406,695,599,651,096,300,000,000,000,000,000,000 | 4 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
CURLcode Curl_disconnect(struct connectdata *conn, bool dead_connection)
{
struct Curl_easy *data;
if(!conn)
return CURLE_OK; /* this is closed and fine already */
data = conn->data;
if(!data) {
DEBUGF(fprintf(stderr, "DISCONNECT without easy handle, ignoring\n"));
return CURLE_OK;
}
/*
* I... | 0 | [
"CWE-119"
] | curl | 9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400 | 112,236,002,100,020,310,000,000,000,000,000,000,000 | 60 | url: fix alignment of ssl_backend_data struct
- Align the array of ssl_backend_data on a max 32 byte boundary.
8 is likely to be ok but I went with 32 for posterity should one of
the ssl_backend_data structs change to contain a larger sized variable
in the future.
Prior to this change (since dev 70f1db3, release 7.5... |
static bool dce100_validate_surface_sets(
struct dc_state *context)
{
int i;
for (i = 0; i < context->stream_count; i++) {
if (context->stream_status[i].plane_count == 0)
continue;
if (context->stream_status[i].plane_count > 1)
return false;
if (context->stream_status[i].plane_states[0]->format
>... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 104c307147ad379617472dd91a5bcb368d72bd6d | 164,073,618,327,495,270,000,000,000,000,000,000,000 | 19 | drm/amd/display: prevent memory leak
In dcn*_create_resource_pool the allocated memory should be released if
construct pool fails.
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
EC_GROUP *EC_GROUP_new(const EC_METHOD *meth)
{
EC_GROUP *ret;
if (meth == NULL) {
ECerr(EC_F_EC_GROUP_NEW, EC_R_SLOT_FULL);
return NULL;
}
if (meth->group_init == 0) {
ECerr(EC_F_EC_GROUP_NEW, ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED);
return NULL;
}
ret = OPENSSL_zal... | 0 | [] | openssl | 30c22fa8b1d840036b8e203585738df62a03cec8 | 296,039,542,026,561,200,000,000,000,000,000,000,000 | 40 | [crypto/ec] for ECC parameters with NULL or zero cofactor, compute it
The cofactor argument to EC_GROUP_set_generator is optional, and SCA
mitigations for ECC currently use it. So the library currently falls
back to very old SCA-vulnerable code if the cofactor is not present.
This PR allows EC_GROUP_set_generator to ... |
TEST_F(RouterTest, NoMetadataMatchCriteria) {
ON_CALL(callbacks_.route_->route_entry_, metadataMatchCriteria()).WillByDefault(Return(nullptr));
EXPECT_CALL(cm_.thread_local_cluster_, httpConnPool(_, _, _))
.WillOnce(Invoke([&](Upstream::ResourcePriority, absl::optional<Http::Protocol>,
... | 0 | [
"CWE-703"
] | envoy | f0bb2219112d8cdb4c4e8b346834f962925362ca | 67,854,038,487,687,290,000,000,000,000,000,000,000 | 20 | [1.20] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
gst_h264_sps_copy (GstH264SPS * dst_sps, const GstH264SPS * src_sps)
{
g_return_val_if_fail (dst_sps != NULL, FALSE);
g_return_val_if_fail (src_sps != NULL, FALSE);
gst_h264_sps_clear (dst_sps);
*dst_sps = *src_sps;
switch (dst_sps->extension_type) {
case GST_H264_NAL_EXTENSION_MVC:
if (!gst_h264... | 0 | [
"CWE-787"
] | gst-plugins-bad | 11353b3f6e2f047cc37483d21e6a37ae558896bc | 243,632,026,949,928,530,000,000,000,000,000,000,000 | 17 | codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703> |
bool checkreturn pb_skip_string(pb_istream_t *stream)
{
uint32_t length;
if (!pb_decode_varint32(stream, &length))
return false;
if ((size_t)length != length)
{
PB_RETURN_ERROR(stream, "size too large");
}
return pb_read(stream, NULL, (size_t)length);
} | 0 | [
"CWE-763"
] | nanopb | e2f0ccf939d9f82931d085acb6df8e9a182a4261 | 140,032,225,380,674,850,000,000,000,000,000,000,000 | 13 | Fix invalid free() with oneof (#647)
Nanopb would call free() or realloc() on an invalid
(attacker controlled) pointer value when all the following
conditions are true:
- PB_ENABLE_MALLOC is defined at the compile time
- Message definition contains an oneof field, and the oneof
contains at least one pointer type fi... |
static __poll_t ib_uverbs_event_poll(struct ib_uverbs_event_queue *ev_queue,
struct file *filp,
struct poll_table_struct *wait)
{
__poll_t pollflags = 0;
poll_wait(filp, &ev_queue->poll_wait, wait);
spin_lock_irq(&ev_queue->lock);
if (!list_empty(&ev_queue->event_list))
pollflags = EPOLLIN | EPOLLRD... | 0 | [
"CWE-362",
"CWE-703",
"CWE-667"
] | linux | 04f5866e41fb70690e28397487d8bd8eea7d712a | 73,597,480,560,686,200,000,000,000,000,000,000,000 | 15 | coredump: fix race condition between mmget_not_zero()/get_task_mm() and core dumping
The core dumping code has always run without holding the mmap_sem for
writing, despite that is the only way to ensure that the entire vma
layout will not change from under it. Only using some signal
serialization on the processes bel... |
static int __init i8042_create_aux_port(int idx)
{
struct serio *serio;
int port_no = idx < 0 ? I8042_AUX_PORT_NO : I8042_MUX_PORT_NO + idx;
struct i8042_port *port = &i8042_ports[port_no];
serio = kzalloc(sizeof(struct serio), GFP_KERNEL);
if (!serio)
return -ENOMEM;
serio->id.type = SERIO_8042;
serio->wri... | 0 | [
"CWE-476"
] | linux | 340d394a789518018f834ff70f7534fc463d3226 | 267,908,158,682,011,640,000,000,000,000,000,000,000 | 36 | Input: i8042 - fix crash at boot time
The driver checks port->exists twice in i8042_interrupt(), first when
trying to assign temporary "serio" variable, and second time when deciding
whether it should call serio_interrupt(). The value of port->exists may
change between the 2 checks, and we may end up calling serio_int... |
static u32 vorbis_book_maptype1_quantvals(u32 entries, u32 dim)
{
u32 vals = (u32) floor(pow(entries, 1.0/dim));
while(1) {
u32 acc=1;
u32 acc1=1;
u32 i;
for (i=0; i<dim; i++) {
acc*=vals;
acc1*=vals+1;
}
if(acc<=entries && acc1>entries) return (vals);
else {
if (acc>entries) vals--;
else va... | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 269,081,763,872,562,240,000,000,000,000,000,000,000 | 18 | fix some exploitable overflows (#994, #997) |
TEST_P(ProxyProtocolTest, V2Fragmented1) {
// A well-formed ipv4/tcp header, delivering part of the signature, then part of
// the address, then the remainder
constexpr uint8_t buffer[] = {0x0d, 0x0a, 0x0d, 0x0a, 0x00, 0x0d, 0x0a, 0x51, 0x55, 0x49,
0x54, 0x0a, 0x21, 0x11, 0x00, 0x0... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 252,557,163,409,824,860,000,000,000,000,000,000,000 | 20 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
soup_cookie_jar_get_cookie_list (SoupCookieJar *jar, SoupURI *uri, gboolean for_http)
{
g_return_val_if_fail (SOUP_IS_COOKIE_JAR (jar), NULL);
g_return_val_if_fail (uri != NULL, NULL);
return get_cookies (jar, uri, for_http, TRUE);
} | 0 | [
"CWE-125"
] | libsoup | db2b0d5809d5f8226d47312b40992cadbcde439f | 166,373,707,070,372,470,000,000,000,000,000,000,000 | 7 | cookie-jar: bail if hostname is an empty string
There are several other ways to fix the problem with this function, but
skipping over all of the code is probably the simplest.
Fixes #3 |
static inline ut16 r_swap_ut16(ut16 val) {
return (val << 8) | (val >> 8 );
} | 0 | [
"CWE-476"
] | radare2 | 1ea23bd6040441a21fbcfba69dce9a01af03f989 | 222,833,039,544,578,820,000,000,000,000,000,000,000 | 3 | Fix #6816 - null deref in r_read_* |
void MainWindow::on_actionBilinear_triggered(bool checked)
{
changeInterpolation(checked, "bilinear");
} | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 169,239,110,350,183,000,000,000,000,000,000,000,000 | 4 | fix upgrade check is not using TLS correctly |
xsltParseExtElemPrefixes(xsltCompilerCtxtPtr cctxt, xmlNodePtr node,
xsltPointerListPtr def,
int instrCategory)
{
xsltPointerListPtr list = NULL;
xmlAttrPtr attr;
xmlChar *value;
int i;
if ((cctxt == NULL) || (node == NULL))
return(NULL);
if (instrCategory == XSLT_ELEMENT_CATEGORY_XSL... | 0 | [] | libxslt | e03553605b45c88f0b4b2980adfbbb8f6fca2fd6 | 29,357,769,270,286,270,000,000,000,000,000,000,000 | 78 | Fix security framework bypass
xsltCheckRead and xsltCheckWrite return -1 in case of error but callers
don't check for this condition and allow access. With a specially
crafted URL, xsltCheckRead could be tricked into returning an error
because of a supposedly invalid URL that would still be loaded
succesfully later on... |
static void predictor_decode_mono_3930(APEContext *ctx, int count)
{
APEPredictor *p = &ctx->predictor;
int32_t *decoded0 = ctx->decoded[0];
ape_apply_filters(ctx, ctx->decoded[0], NULL, count);
while (count--) {
*decoded0 = predictor_update_3930(p, *decoded0, 0, YDELAYA);
decoded0++;
... | 0 | [
"CWE-125"
] | FFmpeg | ba4beaf6149f7241c8bd85fe853318c2f6837ad0 | 83,106,690,476,353,650,000,000,000,000,000,000,000 | 21 | avcodec/apedec: Fix integer overflow
Fixes: out of array access
Fixes: PoC.ape and others
Found-by: Bingchang, Liu@VARAS of IIE
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
xfs_release(
xfs_inode_t *ip)
{
xfs_mount_t *mp = ip->i_mount;
int error;
if (!S_ISREG(ip->i_d.di_mode) || (ip->i_d.di_mode == 0))
return 0;
/* If this is a read-only mount, don't do this (would generate I/O) */
if (mp->m_flags & XFS_MOUNT_RDONLY)
return 0;
if (!XFS_FORCED_SHUTDOWN(mp)) {
int truncated... | 0 | [
"CWE-19"
] | linux | fc0561cefc04e7803c0f6501ca4f310a502f65b8 | 242,226,943,918,910,630,000,000,000,000,000,000,000 | 76 | xfs: optimise away log forces on timestamp updates for fdatasync
xfs: timestamp updates cause excessive fdatasync log traffic
Sage Weil reported that a ceph test workload was writing to the
log on every fdatasync during an overwrite workload. Event tracing
showed that the only metadata modification being made was the... |
int kvmppc_prepare_to_enter(struct kvm_vcpu *vcpu)
{
int r;
WARN_ON(irqs_disabled());
hard_irq_disable();
while (true) {
if (need_resched()) {
local_irq_enable();
cond_resched();
hard_irq_disable();
continue;
}
if (signal_pending(current)) {
kvmppc_account_exit(vcpu, SIGNAL_EXITS);
vcpu->... | 0 | [
"CWE-476"
] | linux | ac64115a66c18c01745bbd3c47a36b124e5fd8c0 | 275,250,436,765,347,250,000,000,000,000,000,000,000 | 60 | KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM
The following program causes a kernel oops:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kvm.h>
main()
{
int fd = open("/dev/kvm", O_RDWR);
ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);
}
This happe... |
static int cap_inode_permission(struct inode *inode, int mask)
{
return 0;
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 267,690,704,632,600,060,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
static int ssl_parse_server_key_exchange( mbedtls_ssl_context *ssl )
{
int ret;
const mbedtls_ssl_ciphersuite_t *ciphersuite_info =
ssl->transform_negotiate->ciphersuite_info;
unsigned char *p = NULL, *end = NULL;
MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse server key exchange" ) );
#if defined(MBED... | 1 | [
"CWE-119",
"CWE-125"
] | mbedtls | 027f84c69f4ef30c0693832a6c396ef19e563ca1 | 176,318,552,125,826,450,000,000,000,000,000,000,000 | 313 | Prevent arithmetic overflow on bounds check |
CWD_API realpath_cache_bucket** realpath_cache_get_buckets(TSRMLS_D)
{
return CWDG(realpath_cache);
} | 0 | [
"CWE-190"
] | php-src | 0218acb7e756a469099c4ccfb22bce6c2bd1ef87 | 146,955,710,587,645,100,000,000,000,000,000,000,000 | 4 | Fix for bug #72513 |
static inline void rectangle_combine(Rectangle *rect, const Bitmap *bm, int x, int y)
{
rect->x_min = FFMIN(rect->x_min, x + bm->left);
rect->y_min = FFMIN(rect->y_min, y + bm->top);
rect->x_max = FFMAX(rect->x_max, x + bm->left + bm->w);
rect->y_max = FFMAX(rect->y_max, y + bm->top + bm->h);
} | 0 | [
"CWE-125"
] | libass | f4f48950788b91c6a30029cc28a240b834713ea7 | 334,949,895,940,848,230,000,000,000,000,000,000,000 | 7 | Fix line wrapping mode 0/3 bugs
This fixes two separate bugs:
a) Don't move a linebreak into the first symbol. This results in a empty
line at the front, which does not help to equalize line lengths at all.
Instead, merge line with the second one.
b) When moving a linebreak into a symbol that already is a break... |
static int airo_get_encodeext(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu,
char *extra)
{
struct airo_info *local = dev->ml_priv;
struct iw_point *encoding = &wrqu->encoding;
struct iw_encode_ext *ext = (struct iw_encode_ext *)extra;
int idx, max_key_len, wep_ke... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 340,194,719,886,403,400,000,000,000,000,000,000,000 | 62 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.