func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void __address_space_init_once(struct address_space *mapping)
{
INIT_RADIX_TREE(&mapping->i_pages, GFP_ATOMIC | __GFP_ACCOUNT);
init_rwsem(&mapping->i_mmap_rwsem);
INIT_LIST_HEAD(&mapping->private_list);
spin_lock_init(&mapping->private_lock);
mapping->i_mmap = RB_ROOT_CACHED;
} | 0 | [
"CWE-269"
] | linux | 0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7 | 56,588,249,135,852,475,000,000,000,000,000,000,000 | 8 | Fix up non-directory creation in SGID directories
sgid directories have special semantics, making newly created files in
the directory belong to the group of the directory, and newly created
subdirectories will also become sgid. This is historically used for
group-shared directories.
But group directories writable b... |
static STACK_OF(POLICYINFO) *r2i_certpol(X509V3_EXT_METHOD *method,
X509V3_CTX *ctx, const char *value)
{
STACK_OF(POLICYINFO) *pols;
char *pstr;
POLICYINFO *pol;
ASN1_OBJECT *pobj;
STACK_OF(CONF_VALUE) *vals = X509V3_parse_list(value);
CONF_VALUE *cnf;
... | 0 | [
"CWE-125"
] | openssl | 5f54e57406ca17731b9ade3afd561d3c652e07f2 | 289,868,493,364,610,160,000,000,000,000,000,000,000 | 78 | Fix POLICYINFO printing to not assume NUL terminated strings
ASN.1 strings may not be NUL terminated. Don't assume they are.
CVE-2021-3712
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org> |
bilinear_magnify_make_weights (PixopsFilterDimension *dim,
double scale)
{
double *pixel_weights;
int n;
int offset;
int i;
if (scale > 1.0) /* Linear */
{
n = 2;
dim->offset = 0.5 * (1 / scale - 1);
}
else /* Tile */
{
... | 1 | [
"CWE-119"
] | gdk-pixbuf | 19f9685dbff7d1f929c61cf99188df917a18811d | 187,573,439,406,901,080,000,000,000,000,000,000,000 | 61 | pixops: Fail make_weights functions on OOM
The weights could grow very large under certain circumstances, in
particular in security-relevant conditions, including the testsuite.
By allowing the weight allocation to fail, this can be worked around.
https://bugzilla.gnome.org/show_bug.cgi?id=754387 |
static int runScript(const struct logInfo *log, const char *logfn, const char *logrotfn, const char *script)
{
int rc;
pid_t pid;
if (debug) {
message(MESS_DEBUG, "running script with args %s %s: \"%s\"\n",
logfn, logrotfn ? logrotfn : "", script);
return 0;
}
pid =... | 0 | [
"CWE-732"
] | logrotate | f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25 | 103,351,389,279,509,280,000,000,000,000,000,000,000 | 31 | Lock state file to prevent parallel execution
Running multiple instances of logrotate on the same set of log-files
might have undesirable effects.
Add command line option --skip-state-lock to skip locking the state
file, for example if locking is unsupported or prohibited.
Fixes: https://github.com/logrotate/logrota... |
static BOOL update_send_surface_command(rdpContext* context, wStream* s)
{
wStream* update;
rdpRdp* rdp = context->rdp;
BOOL ret;
update = fastpath_update_pdu_init(rdp->fastpath);
if (!update)
return FALSE;
if (!Stream_EnsureRemainingCapacity(update, Stream_GetPosition(s)))
{
ret = FALSE;
goto out;
}
... | 0 | [
"CWE-119",
"CWE-787"
] | FreeRDP | 445a5a42c500ceb80f8fa7f2c11f3682538033f3 | 306,149,778,691,335,680,000,000,000,000,000,000,000 | 23 | Fixed CVE-2018-8786
Thanks to Eyal Itkin from Check Point Software Technologies. |
CModule::EModRet CModule::OnSendToClient(CString& sLine, CClient& Client) {
return CONTINUE;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 121,312,525,386,655,350,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
Default_object_creation_ctx::Default_object_creation_ctx(THD *thd)
: m_client_cs(thd->variables.character_set_client),
m_connection_cl(thd->variables.collation_connection)
{ } | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 267,693,933,929,262,860,000,000,000,000,000,000,000 | 4 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
Connection& Security::use_connection()
{
return conn_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 16,733,513,288,847,090,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
Method* LinkResolver::lookup_method_in_klasses(const LinkInfo& link_info,
bool checkpolymorphism,
bool in_imethod_resolve) {
NoSafepointVerifier nsv; // Method* returned may not be reclaimed
Klass* klass = link_info.reso... | 0 | [] | jdk17u | 860464e46105b98ccf21e98abe2dc6e80155887c | 30,155,161,202,999,633,000,000,000,000,000,000,000 | 52 | 8281866: Enhance MethodHandle invocations
Reviewed-by: mbaesken
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
PHPAPI void php_pcre_grep_impl(pcre_cache_entry *pce, zval *input, zval *return_value, long flags TSRMLS_DC) /* {{{ */
{
zval **entry; /* An entry in the input array */
pcre_extra *extra = pce->extra;/* Holds results of studying */
pcre_extra extra_data; /* Used locally for exec options */
int *offse... | 1 | [] | php-src | 03964892c054d0c736414c10b3edc7a40318b975 | 280,443,599,541,714,100,000,000,000,000,000,000,000 | 91 | Fix bug #70345 (Multiple vulnerabilities related to PCRE functions) |
bool delete_(JSContext *cx, unsigned argc, Value *vp) {
METHOD_HEADER_WITH_NAME(1, "delete")
NORMALIZE_NAME(args[0], "Headers.delete")
bool has;
RootedObject map(cx, detail::backing_map(self));
if (!JS::MapDelete(cx, map, normalized_name, &has))
return false;
// If no header with the given name exist... | 0 | [
"CWE-94"
] | js-compute-runtime | 65524ffc962644e9fc39f4b368a326b6253912a9 | 105,157,372,049,610,360,000,000,000,000,000,000,000 | 30 | use rangom_get instead of arc4random as arc4random does not work correctly with wizer
wizer causes the seed in arc4random to be the same between executions which is not random |
static int sony_register_sensors(struct sony_sc *sc)
{
size_t name_sz;
char *name;
int ret;
int range;
sc->sensor_dev = devm_input_allocate_device(&sc->hdev->dev);
if (!sc->sensor_dev)
return -ENOMEM;
input_set_drvdata(sc->sensor_dev, sc);
sc->sensor_dev->dev.parent = &sc->hdev->dev;
sc->sensor_dev->phys =... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 31,295,511,609,257,883,000,000,000,000,000,000,000 | 72 | 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 BOOL clear_decompress_nscodec(NSC_CONTEXT* nsc, UINT32 width, UINT32 height, wStream* s,
UINT32 bitmapDataByteCount, BYTE* pDstData, UINT32 DstFormat,
UINT32 nDstStep, UINT32 nXDstRel, UINT32 nYDstRel)
{
BOOL rc;
if (Stream_GetRemaining... | 0 | [
"CWE-125"
] | FreeRDP | 363d7046dfec4003b91aecf7867e3b05905f3843 | 2,561,498,304,080,266,000,000,000,000,000,000,000 | 19 | Fixed oob read in clear_decompress_subcode_rlex
Fixed length checks before stream read.
Thanks to hac425 CVE-2020-11040 |
acquire_buffer (gboolean *free_buffer)
{
hb_buffer_t *buffer;
if (G_LIKELY (G_TRYLOCK (cached_buffer)))
{
if (G_UNLIKELY (!cached_buffer))
cached_buffer = hb_buffer_new ();
buffer = cached_buffer;
*free_buffer = FALSE;
}
else
{
buffer = hb_buffer_new ();
*free_buffer =... | 0 | [] | pango | 336bb3201096bdd0494d29926dd44e8cca8bed26 | 271,228,931,929,650,400,000,000,000,000,000,000,000 | 20 | [HB] Remove all references to the old code! |
event_sched_in(struct perf_event *event,
struct perf_cpu_context *cpuctx,
struct perf_event_context *ctx)
{
u64 tstamp = perf_event_time(event);
int ret = 0;
lockdep_assert_held(&ctx->lock);
if (event->state <= PERF_EVENT_STATE_OFF)
return 0;
WRITE_ONCE(event->oncpu, smp_processor_id());
/*
* Order e... | 0 | [
"CWE-362",
"CWE-125"
] | linux | 321027c1fe77f892f4ea07846aeae08cefbbb290 | 36,329,978,006,301,857,000,000,000,000,000,000,000 | 65 | perf/core: Fix concurrent sys_perf_event_open() vs. 'move_group' race
Di Shen reported a race between two concurrent sys_perf_event_open()
calls where both try and move the same pre-existing software group
into a hardware context.
The problem is exactly that described in commit:
f63a8daa5812 ("perf: Fix event->ctx... |
int usb_buffer_map_sg(const struct usb_device *dev, int is_in,
struct scatterlist *sg, int nents)
{
struct usb_bus *bus;
struct device *controller;
if (!dev
|| !(bus = dev->bus)
|| !(controller = bus->sysdev)
|| !controller->dma_mask)
return -EINVAL;
/* FIXME generic api broken like pci, can'... | 0 | [
"CWE-400",
"CWE-703"
] | linux | 704620afc70cf47abb9d6a1a57f3825d2bca49cf | 167,172,010,548,407,960,000,000,000,000,000,000,000 | 16 | USB: check usb_get_extra_descriptor for proper size
When reading an extra descriptor, we need to properly check the minimum
and maximum size allowed, to prevent from invalid data being sent by a
device.
Reported-by: Hui Peng <benquike@gmail.com>
Reported-by: Mathias Payer <mathias.payer@nebelwelt.net>
Co-developed-by... |
static void vmxnet3_pci_uninit(PCIDevice *pci_dev)
{
VMXNET3State *s = VMXNET3(pci_dev);
VMW_CBPRN("Starting uninit...");
vmxnet3_net_uninit(s);
vmxnet3_cleanup_msix(s);
vmxnet3_cleanup_msi(s);
} | 0 | [] | qemu | d05dcd94aee88728facafb993c7280547eb4d645 | 158,868,716,354,930,590,000,000,000,000,000,000,000 | 12 | net: vmxnet3: validate configuration values during activate (CVE-2021-20203)
While activating device in vmxnet3_acticate_device(), it does not
validate guest supplied configuration values against predefined
minimum - maximum limits. This may lead to integer overflow or
OOB access issues. Add checks to avoid it.
Fixes... |
static inline bool cfs_rq_has_blocked(struct cfs_rq *cfs_rq) { return false; } | 0 | [
"CWE-400",
"CWE-703"
] | linux | de53fd7aedb100f03e5d2231cfce0e4993282425 | 254,316,592,459,380,400,000,000,000,000,000,000,000 | 1 | sched/fair: Fix low cpu usage with high throttling by removing expiration of cpu-local slices
It has been observed, that highly-threaded, non-cpu-bound applications
running under cpu.cfs_quota_us constraints can hit a high percentage of
periods throttled while simultaneously not consuming the allocated
amount of quota... |
validate_cname_noanswer_response(struct module_env* env, struct val_env* ve,
struct query_info* qchase, struct reply_info* chase_reply,
struct key_entry_key* kkey)
{
int nodata_valid_nsec = 0; /* If true, then NODATA has been proven.*/
uint8_t* ce = NULL; /* for wildcard nodata responses. This is the
proven cl... | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 106,705,706,380,211,970,000,000,000,000,000,000,000 | 115 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
static void unregister_ftrace_profiler(void)
{
unregister_ftrace_function(&ftrace_profile_ops);
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 16,799,363,088,619,258,000,000,000,000,000,000,000 | 4 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
static int _ring_forward_data(pmixp_coll_ring_ctx_t *coll_ctx, uint32_t contrib_id,
uint32_t hop_seq, void *data, size_t size)
{
pmixp_coll_ring_msg_hdr_t hdr;
pmixp_coll_t *coll = _ctx_get_coll(coll_ctx);
pmixp_coll_ring_t *ring = &coll->state.ring;
hdr.nodeid = coll->my_peerid;
hdr.msgsize = size;
hdr.... | 0 | [
"CWE-120"
] | slurm | c3142dd87e06621ff148791c3d2f298b5c0b3a81 | 14,007,868,765,133,310,000,000,000,000,000,000,000 | 51 | PMIx - fix potential buffer overflows from use of unpackmem().
CVE-2020-27745. |
DLLEXPORT int tjCompressFromYUVPlanes(tjhandle handle,
const unsigned char **srcPlanes,
int width, const int *strides,
int height, int subsamp,
unsigned char **jpegBuf,... | 0 | [
"CWE-787"
] | libjpeg-turbo | 2a9e3bd7430cfda1bc812d139e0609c6aca0b884 | 89,938,623,149,130,700,000,000,000,000,000,000,000 | 134 | TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:
- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
integer overflow when computing the retur... |
static inline void __netif_reschedule(struct Qdisc *q)
{
struct softnet_data *sd;
unsigned long flags;
local_irq_save(flags);
sd = &__get_cpu_var(softnet_data);
q->next_sched = NULL;
*sd->output_queue_tailp = q;
sd->output_queue_tailp = &q->next_sched;
raise_softirq_irqoff(NET_TX_SOFTIRQ);
local_irq_restore(f... | 0 | [
"CWE-264"
] | linux | 8909c9ad8ff03611c9c96c9a92656213e4bb495b | 90,576,972,011,791,200,000,000,000,000,000,000,000 | 13 | 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... |
mz_bool mz_zip_reader_file_stat(mz_zip_archive *pZip, mz_uint file_index,
mz_zip_archive_file_stat *pStat) {
mz_uint n;
const mz_uint8 *p = mz_zip_reader_get_cdh(pZip, file_index);
if ((!p) || (!pStat)) return MZ_FALSE;
// Unpack the central directory record.
pStat->m_file_ind... | 0 | [
"CWE-20",
"CWE-190"
] | tinyexr | a685e3332f61cd4e59324bf3f669d36973d64270 | 172,031,456,147,728,800,000,000,000,000,000,000,000 | 44 | Make line_no with too large value(2**20) invalid. Fixes #124 |
void CLASS samsung2_load_raw()
{
static const ushort tab[14] =
{ 0x304,0x307,0x206,0x205,0x403,0x600,0x709,
0x80a,0x90b,0xa0c,0xa0d,0x501,0x408,0x402 };
ushort huff[1026], vpred[2][2] = {{0,0},{0,0}}, hpred[2];
int i, c, n, row, col, diff;
huff[0] = 10;
for (n=i=0; i < 14; i++)
FORC(1024 >> (tab[i]... | 0 | [
"CWE-129"
] | LibRaw | 89d065424f09b788f443734d44857289489ca9e2 | 134,266,478,622,089,670,000,000,000,000,000,000,000 | 26 | fixed two more problems found by fuzzer |
unsigned int scalar2(const mp_func op, const unsigned int arg1, const unsigned int arg2) {
const unsigned int pos =
arg1!=~0U && arg1>_cimg_mp_slot_c && _cimg_mp_is_comp(arg1)?arg1:
arg2!=~0U && arg2>_cimg_mp_slot_c && _cimg_mp_is_comp(arg2)?arg2:scalar();
CImg<ulongT>::vector... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 238,273,759,212,428,940,000,000,000,000,000,000,000 | 7 | . |
sctp_disposition_t sctp_sf_do_5_1D_ce(const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type, void *arg,
sctp_cmd_seq_t *commands)
{
struct sctp_chunk *chunk = arg;
struct sctp_association *new_asoc;
sctp_init_chunk_t *peer_init;
struct sctp_chun... | 0 | [] | linux-2.6 | 62b08083ec3dbfd7e533c8d230dd1d8191a6e813 | 128,104,686,191,212,490,000,000,000,000,000,000,000 | 140 | [SCTP]: Fix panic's when receiving fragmented SCTP control chunks.
Use pskb_pull() to handle incoming COOKIE_ECHO and HEARTBEAT chunks that
are received as skb's with fragment list.
Signed-off-by: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net> |
void php_filter_int(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
{
zval *option_val;
zend_long min_range, max_range, option_flags;
int min_range_set, max_range_set;
int allow_octal = 0, allow_hex = 0;
size_t len;
int error = 0;
zend_long ctx_value;
char *p;
/* Parse options */
FETCH_LONG_OPTION(min_range, ... | 0 | [
"CWE-20"
] | php-src | 4a89e726bd4d0571991dc22a9a1ad4509e8fe347 | 165,662,586,746,318,000,000,000,000,000,000,000,000 | 64 | Alternative fix for bug 77423
That bug report originally was about `parse_url()` misbehaving, but the
security aspect was actually only regarding `FILTER_VALIDATE_URL`.
Since the changes to `parse_url_ex()` apparently affect userland code
which is relying on the sloppy URL parsing[1], this alternative
restores the old... |
static void kvm_set_mmio_data(struct kvm_vcpu *vcpu)
{
struct kvm_mmio_req *p = kvm_get_vcpu_ioreq(vcpu);
if (!vcpu->mmio_is_write)
memcpy(&p->data, vcpu->mmio_data, 8);
p->state = STATE_IORESP_READY;
} | 1 | [] | linux | f78146b0f9230765c6315b2e14f56112513389ad | 319,830,191,342,842,530,000,000,000,000,000,000,000 | 8 | KVM: Fix page-crossing MMIO
MMIO that are split across a page boundary are currently broken - the
code does not expect to be aborted by the exit to userspace for the
first MMIO fragment.
This patch fixes the problem by generalizing the current code for handling
16-byte MMIOs to handle a number of "fragments", and cha... |
static void io_uring_show_fdinfo(struct seq_file *m, struct file *f)
{
struct io_ring_ctx *ctx = f->private_data;
if (percpu_ref_tryget(&ctx->refs)) {
__io_uring_show_fdinfo(ctx, m);
percpu_ref_put(&ctx->refs);
} | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 97,966,954,852,246,970,000,000,000,000,000,000,000 | 9 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
ngx_mail_log_error(ngx_log_t *log, u_char *buf, size_t len)
{
u_char *p;
ngx_mail_session_t *s;
ngx_mail_log_ctx_t *ctx;
if (log->action) {
p = ngx_snprintf(buf, len, " while %s", log->action);
len -= p - buf;
buf = p;
}
ctx = log->data;
p = ngx_snpr... | 0 | [
"CWE-284",
"CWE-295"
] | nginx | 173f16f736c10eae46cd15dd861b04b82d91a37a | 239,922,479,806,301,830,000,000,000,000,000,000,000 | 46 | Mail: max_errors directive.
Similarly to smtpd_hard_error_limit in Postfix and smtp_max_unknown_commands
in Exim, specifies the number of errors after which the connection is closed. |
GetCode(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP)
{
int rv;
rv = GetCode_(fd, scd, code_size,flag, ZeroDataBlockP);
if (VERBOSE) printf("[GetCode(,%d,%d) returning %d]\n",code_size,flag,rv);
return(rv);
} | 0 | [
"CWE-119"
] | php-src | 07b5896a1389c3e865cbd2fb353806b2cefe4f5c | 111,086,251,377,664,110,000,000,000,000,000,000,000 | 8 | Fix bug #68601 buffer read overflow in gd_gif_in.c |
JwtProviderList getAllProvidersAsList(const Protobuf::Map<std::string, JwtProvider>& providers) {
JwtProviderList list;
for (const auto& it : providers) {
list.emplace_back(&it.second);
}
return list;
} | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 41,559,124,371,088,154,000,000,000,000,000,000,000 | 7 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
T _cubic_atXY_pc(const float fx, const float fy, const int z, const int c) const {
return cimg::type<T>::cut(_cubic_atXY_p(fx,fy,z,c));
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 193,404,152,731,403,340,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static void ovs_nla_free_clone_action(const struct nlattr *action)
{
const struct nlattr *a = nla_data(action);
int rem = nla_len(action);
switch (nla_type(a)) {
case OVS_CLONE_ATTR_EXEC:
/* The real list of actions follows this attribute. */
a = nla_next(a, &rem);
ovs_nla_free_nested_actions(a, rem);
brea... | 0 | [
"CWE-362",
"CWE-787"
] | linux | cefa91b2332d7009bc0be5d951d6cbbf349f90f8 | 293,240,842,519,966,600,000,000,000,000,000,000,000 | 13 | openvswitch: fix OOB access in reserve_sfa_size()
Given a sufficiently large number of actions, while copying and
reserving memory for a new action of a new flow, if next_offset is
greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does
not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS... |
int prepare_binprm(struct linux_binprm *bprm)
{
umode_t mode;
struct inode * inode = bprm->file->f_path.dentry->d_inode;
int retval;
mode = inode->i_mode;
if (bprm->file->f_op == NULL)
return -EACCES;
/* clear any previous set[ug]id data from a previous binary */
bprm->cred->euid = current_euid();
bprm->cre... | 0 | [
"CWE-200"
] | linux-2.6 | d740269867021faf4ce38a449353d2b986c34a67 | 158,501,706,141,746,260,000,000,000,000,000,000,000 | 48 | exec: use -ELOOP for max recursion depth
To avoid an explosion of request_module calls on a chain of abusive
scripts, fail maximum recursion with -ELOOP instead of -ENOEXEC. As soon
as maximum recursion depth is hit, the error will fail all the way back
up the chain, aborting immediately.
This also has the side-effec... |
void avahi_s_record_browser_destroy(AvahiSRecordBrowser *b) {
assert(b);
browser_cancel(b);
AVAHI_LLIST_REMOVE(AvahiSRecordBrowser, browser, b->server->record_browsers, b);
avahi_key_unref(b->key);
avahi_free(b);
} | 0 | [] | avahi | 9d31939e55280a733d930b15ac9e4dda4497680c | 85,922,130,948,658,790,000,000,000,000,000,000,000 | 11 | Fix NULL pointer crashes from #175
avahi-daemon is crashing when running "ping .local".
The crash is due to failing assertion from NULL pointer.
Add missing NULL pointer checks to fix it.
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd |
static void rsi_set_contention_vals(struct rsi_common *common)
{
u8 ii = 0;
for (; ii < NUM_EDCA_QUEUES; ii++) {
common->tx_qinfo[ii].wme_params =
(((common->edca_params[ii].cw_min / 2) +
(common->edca_params[ii].aifs)) *
WMM_SHORT_SLOT_TIME + SIFS_DURATION);
common->tx_qinfo[ii].weight = common->tx... | 0 | [
"CWE-400",
"CWE-401"
] | linux | d563131ef23cbc756026f839a82598c8445bc45f | 158,455,530,371,626,460,000,000,000,000,000,000,000 | 13 | rsi: release skb if rsi_prepare_beacon fails
In rsi_send_beacon, if rsi_prepare_beacon fails the allocated skb should
be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
static inline void native_load_gdt(const struct desc_ptr *dtr)
{
asm volatile("lgdt %0"::"m" (*dtr));
} | 0 | [
"CWE-119"
] | linux-2.6 | 5ac37f87ff18843aabab84cf75b2f8504c2d81fe | 337,620,039,984,246,960,000,000,000,000,000,000,000 | 4 | x86: fix ldt limit for 64 bit
Fix size of LDT entries. On x86-64, ldt_desc is a double-sized descriptor.
Signed-off-by: Michael Karcher <kernel@mkarcher.dialup.fu-berlin.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu> |
handle_get_id (GdmDBusDisplay *skeleton,
GDBusMethodInvocation *invocation,
GdmDisplay *self)
{
char *id;
gdm_display_get_id (self, &id, NULL);
gdm_dbus_display_complete_get_id (skeleton, invocation, id);
g_free (id);
return TRUE... | 0 | [
"CWE-754"
] | gdm | 4e6e5335d29c039bed820c43bfd1c19cb62539ff | 13,354,098,424,454,673,000,000,000,000,000,000,000 | 13 | display: Use autoptr to handle errors in look for existing users
It will make things just cleaner |
void rtnl_register(int protocol, int msgtype,
rtnl_doit_func doit, rtnl_dumpit_func dumpit,
rtnl_calcit_func calcit)
{
if (__rtnl_register(protocol, msgtype, doit, dumpit, calcit) < 0)
panic("Unable to register rtnetlink message handler, "
"protocol = %d, message type = %d\n",
protocol, msg... | 0 | [
"CWE-399"
] | linux-2.6 | 84d73cd3fb142bf1298a8c13fd4ca50fd2432372 | 297,969,200,169,462,470,000,000,000,000,000,000,000 | 9 | rtnl: fix info leak on RTM_GETLINK request for VF devices
Initialize the mac address buffer with 0 as the driver specific function
will probably not fill the whole buffer. In fact, all in-kernel drivers
fill only ETH_ALEN of the MAX_ADDR_LEN bytes, i.e. 6 of the 32 possible
bytes. Therefore we currently leak 26 bytes ... |
static void ide_rw_error(IDEState *s) {
ide_abort_command(s);
ide_set_irq(s->bus);
} | 0 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 241,184,135,454,491,400,000,000,000,000,000,000,000 | 4 | ide: Correct improper smart self test counter reset in ide core.
The SMART self test counter was incorrectly being reset to zero,
not 1. This had the effect that on every 21st SMART EXECUTE OFFLINE:
* We would write off the beginning of a dynamically allocated buffer
* We forgot the SMART history
Fix this.
Signed-o... |
define_class(mrb_state *mrb, mrb_sym name, struct RClass *super, struct RClass *outer)
{
struct RClass * c;
if (mrb_const_defined_at(mrb, mrb_obj_value(outer), name)) {
c = class_from_sym(mrb, outer, name);
MRB_CLASS_ORIGIN(c);
if (super && mrb_class_real(c->super) != super) {
mrb_raisef(mrb, E_T... | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 125,137,559,937,892,320,000,000,000,000,000,000,000 | 19 | class.c: clear method cache after `remove_method`. |
rsock_s_recvfrom(VALUE sock, int argc, VALUE *argv, enum sock_recv_type from)
{
rb_io_t *fptr;
VALUE str;
struct recvfrom_arg arg;
VALUE len, flg;
long buflen;
long slen;
rb_scan_args(argc, argv, "12", &len, &flg, &str);
if (flg == Qnil) arg.flags = 0;
else arg.flags = ... | 1 | [
"CWE-908"
] | ruby | 61b7f86248bd121be2e83768be71ef289e8e5b90 | 251,349,640,825,072,100,000,000,000,000,000,000,000 | 60 | ext/socket/init.c: do not return uninitialized buffer
Resize string buffer only if some data is received in
BasicSocket#read_nonblock and some methods.
Co-Authored-By: Samuel Williams <samuel.williams@oriontransfer.co.nz> |
static int perf_sysexit_enable(struct ftrace_event_call *call)
{
int ret = 0;
int num;
num = ((struct syscall_metadata *)call->data)->syscall_nr;
mutex_lock(&syscall_trace_lock);
if (!sys_perf_refcount_exit)
ret = register_trace_sys_exit(perf_syscall_exit, NULL);
if (ret) {
pr_info("event trace: Could not a... | 0 | [
"CWE-125",
"CWE-476",
"CWE-119",
"CWE-264"
] | linux | 086ba77a6db00ed858ff07451bedee197df868c9 | 328,552,937,512,214,500,000,000,000,000,000,000,000 | 20 | tracing/syscalls: Ignore numbers outside NR_syscalls' range
ARM has some private syscalls (for example, set_tls(2)) which lie
outside the range of NR_syscalls. If any of these are called while
syscall tracing is being performed, out-of-bounds array access will
occur in the ftrace and perf sys_{enter,exit} handlers.
... |
gin::Handle<WebContents> WebContents::CreateAndTake(
v8::Isolate* isolate,
std::unique_ptr<content::WebContents> web_contents,
Type type) {
return gin::CreateHandle(
isolate, new WebContents(isolate, std::move(web_contents), type));
} | 0 | [
"CWE-284",
"CWE-693"
] | electron | 18613925610ba319da7f497b6deed85ad712c59b | 222,134,975,986,660,900,000,000,000,000,000,000,000 | 7 | refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25108)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL
* spec: add test for x-site _top navigation
* chore: old cod... |
authenticateDigestNonceDelete(digest_nonce_h * nonce)
{
if (nonce) {
assert(nonce->references == 0);
#if UNREACHABLECODE
if (nonce->flags.incache)
hash_remove_link(digest_nonce_cache, nonce);
#endif
assert(!nonce->flags.incache);
safe_free(nonce->key);
digest... | 0 | [
"CWE-190",
"CWE-352"
] | squid | eeebf0f37a72a2de08348e85ae34b02c34e9a811 | 11,917,951,748,364,691,000,000,000,000,000,000,000 | 18 | Fix auth digest refcount integer overflow (#585)
This fixes a possible overflow of the nonce reference counter in the
digest authentication scheme, found by security researchers
@synacktiv.
It changes `references` to be an 64 bits unsigned integer. This makes
overflowing the counter impossible in practice. |
static int ZEND_FASTCALL ZEND_IS_EQUAL_SPEC_TMP_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *result = &EX_T(opline->result.u.var).tmp_var;
compare_function(result,
_get_zval_ptr_tmp(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC),
&opline->op2.u.constant TSRM... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 264,717,032,808,729,220,000,000,000,000,000,000,000 | 14 | - 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 streamFreeConsumer(streamConsumer *sc) {
raxFree(sc->pel); /* No value free callback: the PEL entries are shared
between the consumer and the main stream PEL. */
sdsfree(sc->name);
zfree(sc);
} | 0 | [
"CWE-125",
"CWE-704"
] | redis | c04082cf138f1f51cedf05ee9ad36fb6763cafc6 | 144,432,272,274,794,420,000,000,000,000,000,000,000 | 6 | Abort in XGROUP if the key is not a stream |
void Jp2Image::encodeJp2Header(const DataBuf& boxBuf,DataBuf& outBuf)
{
DataBuf output(boxBuf.size_ + iccProfile_.size_ + 100); // allocate sufficient space
long outlen = sizeof(Jp2BoxHeader) ; // now many bytes have we written to output?
long inlen = sizeof(Jp2BoxHeader) ; // how ... | 0 | [
"CWE-703",
"CWE-787"
] | exiv2 | f9308839198aca5e68a65194f151a1de92398f54 | 152,635,762,460,183,120,000,000,000,000,000,000,000 | 72 | Better bounds checking in Jp2Image::encodeJp2Header() |
static int airo_pci_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct airo_info *ai = dev->ml_priv;
pci_power_t prev_state = pdev->current_state;
pci_set_power_state(pdev, PCI_D0);
pci_restore_state(pdev);
pci_enable_wake(pdev, PCI_D0, 0);
if (prev_state != PCI_D1) {
reset... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 104,641,930,160,153,230,000,000,000,000,000,000,000 | 44 | 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... |
inline void WireFormatLite::WriteFixed64NoTag(uint64_t value,
io::CodedOutputStream* output) {
output->WriteLittleEndian64(value);
} | 0 | [
"CWE-703"
] | protobuf | d1635e1496f51e0d5653d856211e8821bc47adc4 | 91,597,438,703,529,950,000,000,000,000,000,000,000 | 4 | Apply patch |
static inline void __cpuid(unsigned int *eax, unsigned int *ebx,
unsigned int *ecx, unsigned int *edx)
{
PVOP_VCALL4(cpu.cpuid, eax, ebx, ecx, edx);
} | 0 | [
"CWE-276"
] | linux | cadfad870154e14f745ec845708bc17d166065f2 | 11,089,967,571,254,310,000,000,000,000,000,000,000 | 5 | x86/ioperm: Fix io bitmap invalidation on Xen PV
tss_invalidate_io_bitmap() wasn't wired up properly through the pvop
machinery, so the TSS and Xen's io bitmap would get out of sync
whenever disabling a valid io bitmap.
Add a new pvop for tss_invalidate_io_bitmap() to fix it.
This is XSA-329.
Fixes: 22fe5b0439dd ("... |
static void mark_reg_stack_read(struct bpf_verifier_env *env,
/* func where src register points to */
struct bpf_func_state *ptr_state,
int min_off, int max_off, int dst_regno)
{
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_func_state *state = vstate->frame[vstate->curframe];
int i, slo... | 0 | [
"CWE-307"
] | linux | 350a5c4dd2452ea999cc5e1d4a8dbf12de2f97ef | 300,072,830,462,443,900,000,000,000,000,000,000,000 | 41 | bpf: Dont allow vmlinux BTF to be used in map_create and prog_load.
The syzbot got FD of vmlinux BTF and passed it into map_create which caused
crash in btf_type_id_size() when it tried to access resolved_ids. The vmlinux
BTF doesn't have 'resolved_ids' and 'resolved_sizes' initialized to save
memory. To avoid such is... |
GF_Err paen_AddBox(GF_Box *s, GF_Box *a)
{
FDPartitionEntryBox *ptr = (FDPartitionEntryBox *)s;
switch(a->type) {
case GF_ISOM_BOX_TYPE_FPAR:
if (ptr->blocks_and_symbols) ERROR_ON_DUPLICATED_BOX(a, ptr)
ptr->blocks_and_symbols = (FilePartitionBox *)a;
return GF_OK;
case GF_ISOM_BOX_TYPE_FECR:
if (ptr->FEC_... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 322,406,554,433,902,730,000,000,000,000,000,000,000 | 21 | prevent dref memleak on invalid input (#1183) |
inline void AveragePool(const float* input_data, const Dims<4>& input_dims,
int stride_width, int stride_height, int pad_width,
int pad_height, int kwidth, int kheight,
float output_activation_min,
float output_activation_ma... | 1 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 64,221,759,447,572,580,000,000,000,000,000,000,000 | 18 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
nlmclnt_reclaim(struct nlm_host *host, struct file_lock *fl)
{
struct nlm_rqst reqst, *req;
int status;
req = &reqst;
memset(req, 0, sizeof(*req));
locks_init_lock(&req->a_args.lock.fl);
locks_init_lock(&req->a_res.lock.fl);
req->a_host = host;
req->a_flags = 0;
/* Set up the argument struct */
nlmclnt_se... | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 211,522,170,271,188,770,000,000,000,000,000,000,000 | 38 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
static plist_t parse_unicode_node(const char **bnode, uint64_t size)
{
plist_data_t data = plist_new_plist_data();
uint64_t i = 0;
uint16_t *unicodestr = NULL;
char *tmpstr = NULL;
long items_read = 0;
long items_written = 0;
data->type = PLIST_STRING;
unicodestr = (uint16_t*) malloc(si... | 0 | [
"CWE-770"
] | libplist | 26061aac4ec75e7a4469a9aab9a424716223e5c4 | 292,392,421,612,544,270,000,000,000,000,000,000,000 | 26 | bplist: Check for invalid offset_size in bplist trailer |
RZ_API void rz_bin_dex_free(RZ_NULLABLE RzBinDex *dex) {
if (!dex) {
return;
}
rz_pvector_free(dex->strings);
rz_pvector_free(dex->proto_ids);
rz_pvector_free(dex->field_ids);
rz_pvector_free(dex->method_ids);
rz_pvector_free(dex->class_defs);
rz_buf_free(dex->relocs_buffer);
free(dex->types);
free(dex->r... | 0 | [
"CWE-787"
] | rizin | 1524f85211445e41506f98180f8f69f7bf115406 | 286,514,809,392,972,600,000,000,000,000,000,000,000 | 16 | fix #2969 - oob write (1 byte) in dex.c |
int LinkResolver::vtable_index_of_interface_method(KlassHandle klass,
methodHandle resolved_method) {
int vtable_index = Method::invalid_vtable_index;
Symbol* name = resolved_method->name();
Symbol* signature = resolved_method->signature();
// First check in default m... | 0 | [] | jdk8u | f14e35d20e1a4d0f507f05838844152f2242c6d3 | 67,218,752,938,336,310,000,000,000,000,000,000,000 | 25 | 8281866: Enhance MethodHandle invocations
Reviewed-by: andrew
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
static void saa7164_bus_dumpmsg(struct saa7164_dev *dev, struct tmComResInfo *m,
void *buf)
{
dprintk(DBGLVL_BUS, "Dumping msg structure:\n");
dprintk(DBGLVL_BUS, " .id = %d\n", m->id);
dprintk(DBGLVL_BUS, " .flags = 0x%x\n", m->flags);
dprintk(DBGLVL_BUS, " .size = 0x%x\n... | 0 | [
"CWE-125"
] | media-tree | 354dd3924a2e43806774953de536257548b5002c | 40,289,514,362,484,054,000,000,000,000,000,000,000 | 13 | [PATCH] saa7164: Bug - Double fetch PCIe access condition
Avoid a double fetch by reusing the values from the prior transfer.
Originally reported via https://bugzilla.kernel.org/show_bug.cgi?id=195559
Thanks to Pengfei Wang <wpengfeinudt@gmail.com> for reporting.
Signed-off-by: Steven Toth <stoth@kernellabs.com> |
static void pb_field_init(pb_field_iterator_t *iter, const pb_field_t *fields, void *dest_struct)
{
iter->start = iter->pos = fields;
iter->field_index = 0;
iter->required_field_index = 0;
iter->pData = (char*)dest_struct + iter->pos->data_offset;
iter->pSize = (char*)iter->pData + iter->pos->size_o... | 0 | [
"CWE-125"
] | nanopb | 7b396821ddd06df8e39143f16e1dc0a4645b89a3 | 245,058,385,241,795,360,000,000,000,000,000,000,000 | 9 | Fix invalid free() after failed realloc() (GHSA-gcx3-7m76-287p) |
static int parse_context_options(php_stream_context *context, zval *options TSRMLS_DC)
{
HashPosition pos, opos;
zval **wval, **oval;
char *wkey, *okey;
uint wkey_len, okey_len;
int ret = SUCCESS;
ulong num_key;
zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(options), &pos);
while (SUCCESS == zend_hash_get_cur... | 0 | [
"CWE-20"
] | php-src | 52b93f0cfd3cba7ff98cc5198df6ca4f23865f80 | 39,163,158,607,263,473,000,000,000,000,000,000,000 | 31 | Fixed bug #69353 (Missing null byte checks for paths in various PHP extensions) |
static void hci_sync_conn_complete_evt(struct hci_dev *hdev,
struct sk_buff *skb)
{
struct hci_ev_sync_conn_complete *ev = (void *) skb->data;
struct hci_conn *conn;
BT_DBG("%s status 0x%2.2x", hdev->name, ev->status);
hci_dev_lock(hdev);
conn = hci_conn_hash_lookup_ba(hdev, ev->link_type, &ev->bdadd... | 0 | [
"CWE-416"
] | linux | 5c4c8c9544099bb9043a10a5318130a943e32fc3 | 46,496,223,372,348,790,000,000,000,000,000,000,000 | 80 | Bluetooth: verify AMP hci_chan before amp_destroy
hci_chan can be created in 2 places: hci_loglink_complete_evt() if
it is an AMP hci_chan, or l2cap_conn_add() otherwise. In theory,
Only AMP hci_chan should be removed by a call to
hci_disconn_loglink_complete_evt(). However, the controller might mess
up, call that fun... |
restore_page_device(const gs_gstate * pgs_old, const gs_gstate * pgs_new)
{
gx_device *dev_old = gs_currentdevice(pgs_old);
gx_device *dev_new;
gx_device *dev_t1;
gx_device *dev_t2;
bool samepagedevice = obj_eq(dev_old->memory, &gs_int_gstate(pgs_old)->pagedevice,
&gs_int_gstate(pgs_new)->pa... | 1 | [] | ghostpdl | 3e5d316b72e3965b7968bb1d96baa137cd063ac6 | 24,678,390,652,440,537,000,000,000,000,000,000,000 | 30 | Bug 699718: Ensure stack space is available before gsrestore call out
During a grestore, if the device is going to change, we call out to Postscript
to restore the device configuration, before returning to restore the graphics
state internally.
We have to ensure sufficient op stack space is available to complete the
... |
compare_by_size (NautilusFile *file_1, NautilusFile *file_2)
{
/* Sort order:
* Directories with n items
* Directories with 0 items
* Directories with "unknowable" # of items
* Directories with unknown # of items
* Files with large sizes.
* Files with smaller sizes.
* Files with "unknowable... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 59,225,195,635,290,170,000,000,000,000,000,000,000 | 31 | 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-... |
static void n(char* pattern, char* str)
{
xx(pattern, str, 0, 0, 0, 1);
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 270,982,664,719,422,200,000,000,000,000,000,000,000 | 4 | onig-5.9.2 |
int h2_make_htx_trailers(struct http_hdr *list, struct htx *htx)
{
uint32_t idx;
int i;
for (idx = 0; list[idx].n.len != 0; idx++) {
if (!list[idx].n.ptr) {
/* This is an indexed pseudo-header (RFC7540#8.1.2.1) */
goto fail;
}
/* RFC7540#8.1.2: upper case not allowed in header field names */
for (i =... | 1 | [
"CWE-74"
] | haproxy | 54f53ef7ce4102be596130b44c768d1818570344 | 40,566,395,827,650,970,000,000,000,000,000,000,000 | 44 | BUG/MAJOR: h2: reject header values containing invalid chars
Tim D�sterhus reported an annoying problem in the H2 decoder related to
an ambiguity in the H2 spec. The spec says in section 10.3 that HTTP/2
allows header field values that are not valid (since they're binary) and
at the same time that an H2 to H1 gateway ... |
xmlSchemaDeriveFacetErr(xmlSchemaParserCtxtPtr pctxt,
xmlSchemaFacetPtr facet1,
xmlSchemaFacetPtr facet2,
int lessGreater,
int orEqual,
int ofBase)
{
xmlChar *msg = NULL;
msg = xmlStrdup(BAD_CAST "'");
msg = xmlStrcat(msg, xmlSchemaFacetTypeToString(facet1->type));
msg = xmlStrcat(msg, B... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 167,017,327,885,207,920,000,000,000,000,000,000,000 | 36 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
Item_fixed_hybrid(THD *thd): Item(thd), fixed(false)
{ } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 129,772,403,204,132,100,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static int bnx2x_prev_path_mark_eeh(struct bnx2x *bp)
{
struct bnx2x_prev_path_list *tmp_list;
int rc;
rc = down_interruptible(&bnx2x_prev_sem);
if (rc) {
BNX2X_ERR("Received %d when tried to take lock\n", rc);
return rc;
}
tmp_list = bnx2x_prev_path_get_entry(bp);
if (tmp_list) {
tmp_list->aer = 1;
rc... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 11,008,513,449,324,450,000,000,000,000,000,000,000 | 24 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
u16 tipc_link_rcv_nxt(struct tipc_link *l)
{
return l->rcv_nxt;
} | 0 | [
"CWE-787"
] | linux | 9aa422ad326634b76309e8ff342c246800621216 | 77,167,667,916,311,430,000,000,000,000,000,000,000 | 4 | tipc: improve size validations for received domain records
The function tipc_mon_rcv() allows a node to receive and process
domain_record structs from peer nodes to track their views of the
network topology.
This patch verifies that the number of members in a received domain
record does not exceed the limit defined b... |
static int gnutls_system_mutex_deinit(void **priv)
{
return 0;
} | 0 | [
"CWE-20"
] | gnutls | b0a3048e56611a2deee4976aeba3b8c0740655a6 | 275,981,454,715,066,460,000,000,000,000,000,000,000 | 4 | env: use secure_getenv when reading environment variables |
void nfs4_close_sync(struct path *path, struct nfs4_state *state, fmode_t fmode)
{
__nfs4_close(path, state, fmode, 1);
} | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 337,913,339,338,793,960,000,000,000,000,000,000,000 | 4 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
void visit(Ignore &ope) override { ope.ope_->accept(*this); } | 0 | [
"CWE-125"
] | cpp-peglib | b3b29ce8f3acf3a32733d930105a17d7b0ba347e | 153,491,408,602,079,800,000,000,000,000,000,000,000 | 1 | Fix #122 |
*/
netdev_features_t netdev_increment_features(netdev_features_t all,
netdev_features_t one, netdev_features_t mask)
{
if (mask & NETIF_F_HW_CSUM)
mask |= NETIF_F_CSUM_MASK;
mask |= NETIF_F_VLAN_CHALLENGED;
all |= one & (NETIF_F_ONE_FOR_ALL | NETIF_F_CSUM_MASK) & mask;
all &= one | ~NETIF_F_ALL_FOR_ALL;
/* I... | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 328,224,386,056,729,950,000,000,000,000,000,000,000 | 16 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
void visit(Vertex_handle ) {} | 0 | [
"CWE-125"
] | cgal | 5a1ab45058112f8647c14c02f58905ecc597ec76 | 281,529,820,780,446,100,000,000,000,000,000,000,000 | 1 | Fix Nef_3 |
int my_wc_mb_utf8_escape(CHARSET_INFO *cs, my_wc_t wc, uchar *str, uchar *end,
my_wc_t sep, my_wc_t escape)
{
DBUG_ASSERT(escape == 0 || escape == '\\');
DBUG_ASSERT(sep == '"' || sep == '\'');
switch (wc) {
case 0: return my_wc_mb_utf8_opt_escape(cs, wc, escape, '0', str, end);
... | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 282,045,355,504,415,470,000,000,000,000,000,000,000 | 18 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
std::string Magick::Image::magick(void) const
{
if (*(constImage()->magick) != '\0')
return(std::string(constImage()->magick));
return(constOptions()->magick());
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 239,868,039,392,219,800,000,000,000,000,000,000,000 | 7 | Added missing return to avoid use after free. |
static void gdImageAALine (gdImagePtr im, int x1, int y1, int x2, int y2, int col)
{
/* keep them as 32bits */
long x, y, inc, frac;
long dx, dy,tmp;
int w, wid, wstart;
int thick = im->thick;
if (!im->trueColor) {
/* TBB: don't crash when the image is of the wrong type */
gdImageLine(im, x1, y1, x2, y2, col... | 0 | [
"CWE-476"
] | libgd | a93eac0e843148dc2d631c3ba80af17e9c8c860f | 158,523,802,330,638,530,000,000,000,000,000,000,000 | 113 | Fix potential NULL pointer dereference in gdImageClone() |
mono_array_get_byte_length (MonoArray *array)
{
MonoClass *klass;
int length;
int i;
klass = array->obj.vtable->klass;
if (array->bounds == NULL)
length = array->max_length;
else {
length = 1;
for (i = 0; i < klass->rank; ++ i)
length *= array->bounds [i].length;
}
switch (klass->element_class->byva... | 0 | [
"CWE-264"
] | mono | 035c8587c0d8d307e45f1b7171a0d337bb451f1e | 118,671,307,712,190,730,000,000,000,000,000,000,000 | 40 | Allow only primitive types/enums in RuntimeHelpers.InitializeArray (). |
int OSD::update_crush_location()
{
if (!cct->_conf->osd_crush_update_on_start) {
dout(10) << __func__ << " osd_crush_update_on_start = false" << dendl;
return 0;
}
char weight[32];
if (cct->_conf->osd_crush_initial_weight >= 0) {
snprintf(weight, sizeof(weight), "%.4lf", cct->_conf->osd_crush_initi... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 279,139,071,912,546,700,000,000,000,000,000,000,000 | 40 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
void Command::generateHelpResponse(OperationContext* opCtx,
rpc::ReplyBuilderInterface* replyBuilder,
const Command& command) {
std::stringstream ss;
BSONObjBuilder helpBuilder;
ss << "help for: " << command.getName() << " ";
command.... | 0 | [
"CWE-20"
] | mongo | 5c7c6729c37514760fd34da462b6961a2e385417 | 307,951,802,253,052,420,000,000,000,000,000,000,000 | 12 | SERVER-38275 ban explain with UUID |
static int ssl_parse_server_key_exchange( ssl_context *ssl )
{
#if defined(POLARSSL_DHM_C)
int ret;
size_t n;
unsigned char *p, *end;
unsigned char hash[64];
md5_context md5;
sha1_context sha1;
int hash_id = SIG_RSA_RAW;
unsigned int hashlen = 0;
#endif
SSL_DEBUG_MSG( 2, ( "=> parse... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 334,412,142,108,535,870,000,000,000,000,000,000,000 | 268 | RSA blinding on CRT operations to counter timing attacks |
conntrack_dump_done(struct conntrack_dump *dump OVS_UNUSED)
{
return 0;
} | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 98,516,926,639,634,750,000,000,000,000,000,000,000 | 4 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
void user_disable_single_step(struct task_struct *task)
{
struct pt_regs *regs = task->thread.regs;
if (regs != NULL) {
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
/*
* The logic to disable single stepping should be as
* simple as turning off the Instruction Complete flag.
* And, after doing so, if all debug flags a... | 0 | [
"CWE-119",
"CWE-787"
] | linux | c1fa0768a8713b135848f78fd43ffc208d8ded70 | 233,832,583,775,731,620,000,000,000,000,000,000,000 | 30 | powerpc/tm: Flush TM only if CPU has TM feature
Commit cd63f3c ("powerpc/tm: Fix saving of TM SPRs in core dump")
added code to access TM SPRs in flush_tmregs_to_thread(). However
flush_tmregs_to_thread() does not check if TM feature is available on
CPU before trying to access TM SPRs in order to copy live state to
th... |
GetNextXidAndEpoch(TransactionId *xid, uint32 *epoch)
{
uint32 ckptXidEpoch;
TransactionId ckptXid;
TransactionId nextXid;
/* Must read checkpoint info first, else have race condition */
{
/* use volatile pointer to prevent code rearrangement */
volatile XLogCtlData *xlogctl = XLogCtl;
SpinLockAcquire(&xl... | 0 | [
"CWE-119"
] | postgres | 01824385aead50e557ca1af28640460fa9877d51 | 204,411,004,737,833,400,000,000,000,000,000,000,000 | 30 | Prevent potential overruns of fixed-size buffers.
Coverity identified a number of places in which it couldn't prove that a
string being copied into a fixed-size buffer would fit. We believe that
most, perhaps all of these are in fact safe, or are copying data that is
coming from a trusted source so that any overrun i... |
GF_SampleEncryptionBox * gf_isom_create_piff_psec_box(u8 version, u32 flags, u32 AlgorithmID, u8 IV_size, bin128 KID)
{
GF_SampleEncryptionBox *psec;
psec = (GF_SampleEncryptionBox *) gf_isom_box_new(GF_ISOM_BOX_UUID_PSEC);
if (!psec)
return NULL;
psec->version = version;
psec->flags = flags;
psec->piff_type =... | 0 | [
"CWE-476"
] | gpac | 3b84ffcbacf144ce35650df958432f472b6483f8 | 85,412,431,627,933,210,000,000,000,000,000,000,000 | 19 | fixed #1735 |
int ssl_set_session( ssl_context *ssl, const ssl_session *session )
{
int ret;
if( ssl == NULL ||
session == NULL ||
ssl->session_negotiate == NULL ||
ssl->endpoint != SSL_IS_CLIENT )
{
return( POLARSSL_ERR_SSL_BAD_INPUT_DATA );
}
if( ( ret = ssl_session_copy( ssl->... | 0 | [
"CWE-119"
] | mbedtls | c988f32adde62a169ba340fee0da15aecd40e76e | 13,937,437,076,521,410,000,000,000,000,000,000,000 | 19 | Added max length checking of hostname |
static struct posix_acl *__f2fs_get_acl(struct inode *inode, int type,
struct page *dpage)
{
int name_index = F2FS_XATTR_INDEX_POSIX_ACL_DEFAULT;
void *value = NULL;
struct posix_acl *acl;
int retval;
if (type == ACL_TYPE_ACCESS)
name_index = F2FS_XATTR_INDEX_POSIX_ACL_ACCESS;
retval = f2fs_getxattr(ino... | 0 | [
"CWE-862",
"CWE-285"
] | linux | 073931017b49d9458aa351605b43a7e34598caef | 309,943,056,491,569,620,000,000,000,000,000,000,000 | 30 | posix_acl: Clear SGID bit when setting file permissions
When file permissions are modified via chmod(2) and the user is not in
the owning group or capable of CAP_FSETID, the setgid bit is cleared in
inode_change_ok(). Setting a POSIX ACL via setxattr(2) sets the file
permissions as well as the new ACL, but doesn't cl... |
ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
ext4_lblk_t iblock, unsigned int max_blocks,
struct ext4_ext_path *path, int flags,
unsigned int allocated, struct buffer_head *bh_result,
ext4_fsblk_t newblock)
{
int ret = 0;
int err = 0;
ext4_io_end_t *io = EXT4_I(inode)->cur... | 0 | [
"CWE-703"
] | linux | 744692dc059845b2a3022119871846e74d4f6e11 | 852,482,067,262,065,300,000,000,000,000,000,000 | 115 | ext4: use ext4_get_block_write in buffer write
Allocate uninitialized extent before ext4 buffer write and
convert the extent to initialized after io completes.
The purpose is to make sure an extent can only be marked
initialized after it has been written with new data so
we can safely drop the i_mutex lock in ext4 DIO... |
TEST_F(HttpConnectionManagerImplTest, AlterFilterWatermarkLimits) {
initial_buffer_limit_ = 100;
setup(false, "");
setUpEncoderAndDecoder(false, false);
sendRequestHeadersAndData();
// Check initial limits.
EXPECT_EQ(initial_buffer_limit_, decoder_filters_[0]->callbacks_->decoderBufferLimit());
EXPECT_EQ... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 114,605,670,680,698,030,000,000,000,000,000,000,000 | 27 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
ZEND_VM_COLD_CONSTCONST_HANDLER(6, ZEND_SL, CONST|TMPVARCV, CONST|TMPVARCV)
{
USE_OPLINE
zend_free_op free_op1, free_op2;
zval *op1, *op2;
op1 = GET_OP1_ZVAL_PTR_UNDEF(BP_VAR_R);
op2 = GET_OP2_ZVAL_PTR_UNDEF(BP_VAR_R);
if (ZEND_VM_SPEC && OP1_TYPE == IS_CONST && OP2_TYPE == IS_CONST) {
/* pass */
} else if (E... | 0 | [
"CWE-787"
] | php-src | f1ce8d5f5839cb2069ea37ff424fb96b8cd6932d | 151,406,605,065,735,350,000,000,000,000,000,000,000 | 21 | 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. |
static void geneve_unquiesce(struct geneve_dev *geneve, struct geneve_sock *gs4,
struct geneve_sock __maybe_unused *gs6)
{
rcu_assign_pointer(geneve->sock4, gs4);
if (gs4)
rcu_assign_sk_user_data(gs4->sock->sk, gs4);
#if IS_ENABLED(CONFIG_IPV6)
rcu_assign_pointer(geneve->sock6, gs6);
if (gs6)
rcu_assign... | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 74,887,187,948,043,610,000,000,000,000,000,000,000 | 13 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
tty_clear_pane_line(struct tty *tty, const struct tty_ctx *ctx, u_int py,
u_int px, u_int nx, u_int bg)
{
struct client *c = tty->client;
u_int i, x, rx, ry;
log_debug("%s: %s, %u at %u,%u", __func__, c->name, nx, px, py);
if (tty_clamp_line(tty, ctx, px, py, nx, &i, &x, &rx, &ry))
tty_clear_line(tty, ctx... | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 302,402,131,612,594,000,000,000,000,000,000,000,000 | 11 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
camel_stream_buffer_class_init (CamelStreamBufferClass *class)
{
GObjectClass *object_class;
CamelStreamClass *stream_class;
object_class = G_OBJECT_CLASS (class);
object_class->dispose = stream_buffer_dispose;
object_class->finalize = stream_buffer_finalize;
stream_class = CAMEL_STREAM_CLASS (class);
stream_c... | 0 | [
"CWE-74"
] | evolution-data-server | ba82be72cfd427b5d72ff21f929b3a6d8529c4df | 190,405,137,563,840,060,000,000,000,000,000,000,000 | 18 | I#226 - CVE-2020-14928: Response Injection via STARTTLS in SMTP and POP3
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/226 |
String *Item_float::val_str(String *str)
{
// following assert is redundant, because fixed=1 assigned in constructor
DBUG_ASSERT(fixed == 1);
str->set_real(value,decimals,&my_charset_bin);
return str;
} | 0 | [] | server | b000e169562697aa072600695d4f0c0412f94f4f | 6,427,215,204,753,303,000,000,000,000,000,000,000 | 7 | Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST, COL), NAME_CONST('NAME', NULL))
based on:
commit f7316aa0c9a
Author: Ajo Robert <ajo.robert@oracle.com>
Date: Thu Aug 24 17:03:21 2017 +0530
Bug#26361149 MYSQL SERVER CRASHES AT: COL IN(IFNULL(CONST,
COL), NAME_CONST('NAME'... |
}
static void date_object_free_storage_interval(void *object TSRMLS_DC)
{
php_interval_obj *intern = (php_interval_obj *)object;
timelib_rel_time_dtor(intern->diff);
zend_object_std_dtor(&intern->std TSRMLS_CC); | 0 | [] | php-src | bb057498f7457e8b2eba98332a3bad434de4cf12 | 47,945,032,724,605,200,000,000,000,000,000,000,000 | 8 | Fix #70277: new DateTimeZone($foo) is ignoring text after null byte
The DateTimeZone constructors are not binary safe. They're parsing the timezone
as string, but discard the length when calling timezone_initialize(). This
patch adds a tz_len parameter and a respective check to timezone_initialize(). |
static enum hrtimer_restart io_link_timeout_fn(struct hrtimer *timer)
{
struct io_timeout_data *data = container_of(timer,
struct io_timeout_data, timer);
struct io_kiocb *req = data->req;
struct io_ring_ctx *ctx = req->ctx;
struct io_kiocb *prev = NULL;
unsigned long flags;
spin_lock_irqsave(&ctx->complet... | 0 | [] | linux | 181e448d8709e517c9c7b523fcd209f24eb38ca7 | 152,473,030,906,222,550,000,000,000,000,000,000,000 | 38 | io_uring: async workers should inherit the user creds
If we don't inherit the original task creds, then we can confuse users
like fuse that pass creds in the request header. See link below on
identical aio issue.
Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u
Signed... |
static inline void GetMeanPixelList(PixelList *pixel_list,Quantum *pixel)
{
double
sum;
register SkipList
*p;
size_t
color;
ssize_t
count;
/*
Find the mean value for each of the color.
*/
p=(&pixel_list->skip_list);
color=65536L;
count=0;
sum=0.0;
do
{
color=p->nodes[... | 0 | [
"CWE-119",
"CWE-787"
] | ImageMagick | 025e77fcb2f45b21689931ba3bf74eac153afa48 | 114,163,638,744,477,770,000,000,000,000,000,000,000 | 30 | https://github.com/ImageMagick/ImageMagick/issues/1615 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.