func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
sc_pkcs15emu_esteid_init (sc_pkcs15_card_t * p15card)
{
sc_card_t *card = p15card->card;
unsigned char buff[128];
int r, i;
size_t field_length = 0, modulus_length = 0;
sc_path_t tmppath;
set_string (&p15card->tokeninfo->label, "ID-kaart");
set_string (&p15card->tokeninfo->manufacturer_id, "AS Sertifitseerimisk... | 1 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 277,667,268,773,819,880,000,000,000,000,000,000,000 | 180 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
get_sw_value(buf_T *buf)
{
return buf->b_p_sw ? buf->b_p_sw : buf->b_p_ts;
} | 0 | [
"CWE-20"
] | vim | d0b5138ba4bccff8a744c99836041ef6322ed39a | 95,711,094,183,965,560,000,000,000,000,000,000,000 | 4 | patch 8.0.0056
Problem: When setting 'filetype' there is no check for a valid name.
Solution: Only allow valid characters in 'filetype', 'syntax' and 'keymap'. |
static int git_tcp_connect_sock(char *host, int flags)
{
struct strbuf error_message = STRBUF_INIT;
int sockfd = -1;
const char *port = STR(DEFAULT_GIT_PORT);
struct addrinfo hints, *ai0, *ai;
int gai;
int cnt = 0;
get_host_and_port(&host, &port);
if (!*port)
port = "<none>";
memset(&hints, 0, sizeof(hints... | 0 | [] | git | a02ea577174ab8ed18f847cf1693f213e0b9c473 | 183,604,319,394,710,660,000,000,000,000,000,000,000 | 64 | git_connect_git(): forbid newlines in host and path
When we connect to a git:// server, we send an initial request that
looks something like:
002dgit-upload-pack repo.git\0host=example.com
If the repo path contains a newline, then it's included literally, and
we get:
002egit-upload-pack repo
.git\0host=exampl... |
static int is_in(struct ip_mc_list *pmc, struct ip_sf_list *psf, int type,
int gdeleted, int sdeleted)
{
switch (type) {
case IGMPV3_MODE_IS_INCLUDE:
case IGMPV3_MODE_IS_EXCLUDE:
if (gdeleted || sdeleted)
return 0;
if (!(pmc->gsquery && !psf->sf_gsresp)) {
if (pmc->sfmode == MCAST_INCLUDE)
return 1;
... | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 292,290,283,488,335,420,000,000,000,000,000,000,000 | 43 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
CACHE_LIMITER_FUNC(private_no_expire) /* {{{ */
{
char buf[MAX_STR + 1];
snprintf(buf, sizeof(buf), "Cache-Control: private, max-age=%ld, pre-check=%ld", PS(cache_expire) * 60, PS(cache_expire) * 60); /* SAFE */
ADD_HEADER(buf);
last_modified(TSRMLS_C);
} | 0 | [
"CWE-264"
] | php-src | 25e8fcc88fa20dc9d4c47184471003f436927cde | 331,721,343,396,934,960,000,000,000,000,000,000,000 | 9 | Strict session |
int kvm_arch_prepare_memory_region(struct kvm *kvm,
const struct kvm_memory_slot *old,
struct kvm_memory_slot *new,
enum kvm_mr_change change)
{
if (change == KVM_MR_CREATE || change == KVM_MR_MOVE)
return kvm_alloc_memslot_metadata(kvm, new);
if (change == KVM_MR_FLAGS_ONLY)
memcpy(&new->ar... | 0 | [
"CWE-476"
] | linux | 55749769fe608fa3f4a075e42e89d237c8e37637 | 84,536,404,835,989,820,000,000,000,000,000,000,000 | 15 | KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty
When dirty ring logging is enabled, any dirty logging without an active
vCPU context will cause a kernel oops. But we've already declared that
the shared_info page doesn't get dirty tracking anyway, since it would
be kind of insane to mark it di... |
GF_Err lsrc_box_size(GF_Box *s)
{
GF_LASERConfigurationBox *ptr = (GF_LASERConfigurationBox *)s;
ptr->size += ptr->hdr_size;
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 77510778516803b7f7402d7423c6d6bef50254c3 | 171,771,482,482,904,100,000,000,000,000,000,000,000 | 6 | fixed #2255 |
ssize_t smb_vfs_call_getxattr(struct vfs_handle_struct *handle,
const char *path, const char *name, void *value,
size_t size)
{
VFS_FIND(getxattr);
return handle->fns->getxattr_fn(handle, path, name, value, size);
} | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 278,278,394,244,749,340,000,000,000,000,000,000,000 | 7 | CVE-2015-5252: s3: smbd: Fix symlink verification (file access outside the share).
Ensure matching component ends in '/' or '\0'.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11395
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org> |
static void print_cfs_stats(struct seq_file *m, int cpu)
{
struct cfs_rq *cfs_rq;
rcu_read_lock();
for_each_leaf_cfs_rq(cpu_rq(cpu), cfs_rq)
print_cfs_rq(m, cpu, cfs_rq);
rcu_read_unlock();
} | 0 | [] | linux-2.6 | ac884dec6d4a7df252150af875cffddf8f1d9c15 | 333,231,720,781,053,270,000,000,000,000,000,000,000 | 9 | sched: fair-group scheduling vs latency
Currently FAIR_GROUP sched grows the scheduler latency outside of
sysctl_sched_latency, invert this so it stays within.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu> |
static void vmx_decache_cr3(struct kvm_vcpu *vcpu)
{
if (enable_ept && is_paging(vcpu))
vcpu->arch.cr3 = vmcs_readl(GUEST_CR3);
__set_bit(VCPU_EXREG_CR3, (ulong *)&vcpu->arch.regs_avail);
} | 0 | [] | kvm | a642fc305053cc1c6e47e4f4df327895747ab485 | 271,508,063,192,997,200,000,000,000,000,000,000,000 | 6 | kvm: vmx: handle invvpid vm exit gracefully
On systems with invvpid instruction support (corresponding bit in
IA32_VMX_EPT_VPID_CAP MSR is set) guest invocation of invvpid
causes vm exit, which is currently not handled and results in
propagation of unknown exit to userspace.
Fix this by installing an invvpid vm exit ... |
template<typename tz, typename tc>
CImg<T>& draw_line(CImg<tz>& zbuffer,
const int x0, const int y0, const float z0,
const int x1, const int y1, const float z1,
const CImg<tc>& texture,
const int tx0, const int ty0,
... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 335,793,274,016,545,240,000,000,000,000,000,000,000 | 153 | Fix other issues in 'CImg<T>::load_bmp()'. |
Item *Item_sum_udf_float::copy_or_same(THD* thd)
{
return new (thd->mem_root) Item_sum_udf_float(thd, this);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 208,573,795,754,841,100,000,000,000,000,000,000,000 | 4 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
int tcp_disconnect(struct sock *sk, int flags)
{
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
int old_state = sk->sk_state;
if (old_state != TCP_CLOSE)
tcp_set_state(sk, TCP_CLOSE);
/* ABORT function of RFC793 */
if (old_state == TC... | 0 | [
"CWE-190"
] | net | 3b4929f65b0d8249f19a50245cd88ed1a2f78cff | 300,560,759,677,392,240,000,000,000,000,000,000,000 | 113 | tcp: limit payload size of sacked skbs
Jonathan Looney reported that TCP can trigger the following crash
in tcp_shifted_skb() :
BUG_ON(tcp_skb_pcount(skb) < pcount);
This can happen if the remote peer has advertized the smallest
MSS that linux TCP accepts : 48
An skb can hold 17 fragments, and each fragment can ho... |
void initialize() override {
if (use_eds_) {
on_server_init_function_ = [this]() {
AssertionResult result =
fake_upstreams_[1]->waitForHttpConnection(*dispatcher_, eds_connection_);
RELEASE_ASSERT(result, result.message());
result = eds_connection_->waitForNewStream(*disp... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 72,624,964,928,140,495,000,000,000,000,000,000,000 | 48 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)
{
BIO *bio = arg;
const char *str_write_p, *str_version, *str_content_type = "", *str_details1 = "", *str_details2= "";
str_write_p = write_p ? ">>>" : "<<<";
switch (version)
{
case SSL2_VER... | 1 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 292,758,813,900,585,440,000,000,000,000,000,000,000 | 290 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
fetch_var_cell_from_evbuffer(struct evbuffer *buf, var_cell_t **out,
int linkproto)
{
char *hdr = NULL;
int free_hdr = 0;
size_t n;
size_t buf_len;
uint8_t command;
uint16_t cell_length;
var_cell_t *cell;
int result = 0;
const int wide_circ_ids = linkproto >= MIN_LINK_PROT... | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 26,029,921,911,980,855,000,000,000,000,000,000,000 | 50 | Log malformed hostnames in socks5 request respecting SafeLogging |
hook_config (struct t_weechat_plugin *plugin, const char *option,
t_hook_callback_config *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_config *new_hook_config;
int priority;
const char *ptr_option;
if (!callback)
return NULL;
new_hook = m... | 0 | [
"CWE-20"
] | weechat | c265cad1c95b84abfd4e8d861f25926ef13b5d91 | 279,621,123,870,311,600,000,000,000,000,000,000,000 | 34 | Fix verification of SSL certificates by calling gnutls verify callback (patch #7459) |
TEST_F(ConnectionManagerUtilityTest, SamplingWithRouteOverride) {
EXPECT_CALL(
runtime_.snapshot_,
featureEnabled("tracing.random_sampling", An<const envoy::type::v3::FractionalPercent&>(), _))
.WillOnce(Return(false));
NiceMock<Router::MockRouteTracing> tracingConfig;
EXPECT_CALL(route_, traci... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 72,141,285,003,683,550,000,000,000,000,000,000,000 | 19 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static RRebaseInfo *r_rebase_info_new_from_mach0(RBuffer *cache_buf, struct MACH0_(obj_t) *mach0) {
RFileRange *rebase_ranges = NULL;
struct section_t *sections = NULL;
if (!(sections = MACH0_(get_sections) (mach0))) {
return NULL;
}
ut64 starts_offset = 0, starts_size = 0;
int i = 0;
for (; !sections[i].las... | 0 | [
"CWE-476"
] | radare2 | feaa4e7f7399c51ee6f52deb84dc3f795b4035d6 | 231,665,564,570,125,630,000,000,000,000,000,000,000 | 79 | Fix null deref in xnu.kernelcache ##crash
* Reported by @xshad3 via huntr.dev |
ConnPoolImplBase::tryCreateNewConnection(float global_preconnect_ratio) {
// There are already enough CONNECTING connections for the number of queued streams.
if (!shouldCreateNewConnection(global_preconnect_ratio)) {
ENVOY_LOG(trace, "not creating a new connection, shouldCreateNewConnection returned false.");
... | 0 | [
"CWE-703",
"CWE-674"
] | envoy | 4b6dd3b53cd5c6d4d4df378a2fc62c1707522b31 | 169,703,051,411,475,950,000,000,000,000,000,000,000 | 38 | CVE-2022-23606
Avoid closing other connections to prevent deep recursion when a large number of idle connections are closed at the start of a pool drain, when a connection is closed.
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
TEST_F(Http1ServerConnectionImplTest, WatermarkTest) {
EXPECT_CALL(connection_, bufferLimit()).WillOnce(Return(10));
initialize();
NiceMock<MockRequestDecoder> decoder;
Http::ResponseEncoder* response_encoder = nullptr;
EXPECT_CALL(callbacks_, newStream(_, _))
.WillOnce(Invoke([&](ResponseEncoder& enco... | 0 | [
"CWE-770"
] | envoy | 7ca28ff7d46454ae930e193d97b7d08156b1ba59 | 236,462,682,603,660,020,000,000,000,000,000,000,000 | 33 | [http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145)
Signed-off-by: antonio <avd@google.com> |
static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a)
{
struct tcf_hashinfo *hinfo = a->ops->hinfo;
struct hlist_head *head;
struct hlist_node *n;
struct tcf_common *p;
struct nlattr *nest;
int i = 0, n_i = 0;
int ret = -EINVAL;
nest = nla_nest_start(skb, a->order);
if (nest == NULL)
goto nla_... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 235,715,112,932,697,800,000,000,000,000,000,000,000 | 36 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static int vmx_setup_l1d_flush(enum vmx_l1d_flush_state l1tf)
{
struct page *page;
unsigned int i;
if (!boot_cpu_has_bug(X86_BUG_L1TF)) {
l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_NOT_REQUIRED;
return 0;
}
if (!enable_ept) {
l1tf_vmx_mitigation = VMENTER_L1D_FLUSH_EPT_DISABLED;
return 0;
}
if (boot_cpu_... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 281,776,645,786,467,650,000,000,000,000,000,000,000 | 80 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
static int shorten_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame_ptr, AVPacket *avpkt)
{
AVFrame *frame = data;
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
ShortenContext *s = avctx->priv_data;
int i, input_buf_size = 0;
... | 1 | [
"CWE-703"
] | FFmpeg | 1713eec29add37b654ec6bf262b843d139c1ffc6 | 266,866,423,995,128,970,000,000,000,000,000,000,000 | 214 | shorten: pad the internal bitstream buffer
Fixes invalid reads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
static void i40e_service_timer(struct timer_list *t)
{
struct i40e_pf *pf = from_timer(pf, t, service_timer);
mod_timer(&pf->service_timer,
round_jiffies(jiffies + pf->service_timer_period));
i40e_service_event_schedule(pf);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 199,017,879,288,820,050,000,000,000,000,000,000,000 | 8 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
static void jsB_new_RegExp(js_State *J)
{
js_Regexp *old;
const char *pattern;
int flags;
if (js_isregexp(J, 1)) {
if (js_isdefined(J, 2))
js_typeerror(J, "cannot supply flags when creating one RegExp from another");
old = js_toregexp(J, 1);
pattern = old->source;
flags = old->flags;
} else if (js_isun... | 0 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | mujs | 00d4606c3baf813b7b1c176823b2729bf51002a2 | 45,404,125,818,721,530,000,000,000,000,000,000,000 | 43 | Bug 700937: Limit recursion in regexp matcher.
Also handle negative return code as an error in the JS bindings. |
Luv32fromLuv48(LogLuvState* sp, uint8* op, tmsize_t n)
{
uint32* luv = (uint32*) sp->tbuf;
int16* luv3 = (int16*) op;
if (sp->encode_meth == SGILOGENCODE_NODITHER) {
while (n-- > 0) {
*luv++ = (uint32)luv3[0] << 16 |
(luv3[1]*(uint32)(UVSCALE+.5) >> 7 & 0xff00) |
(luv3[2]*(uint32)(UVSCALE+.5) >> 15 & 0... | 0 | [
"CWE-787"
] | libtiff | aaab5c3c9d2a2c6984f23ccbc79702610439bc65 | 109,022,964,793,335,280,000,000,000,000,000,000,000 | 21 | * libtiff/tif_luv.c: fix potential out-of-bound writes in decode
functions in non debug builds by replacing assert()s by regular if
checks (bugzilla #2522).
Fix potential out-of-bound reads in case of short input data. |
int gnutls_x509_crt_get_version(gnutls_x509_crt_t cert)
{
opaque version[5];
int len, result;
if (cert == NULL) {
gnutls_assert();
return GNUTLS_E_INVALID_REQUEST;
}
len = sizeof(version);
if ((result =
asn1_read_value(cert->cert, "tbsCertificate.version", version,
&len)) != ASN1_SUCCE... | 0 | [] | gnutls | 112d537da5f3500f14316db26d18c37d678a5e0e | 14,950,731,787,807,170,000,000,000,000,000,000,000 | 23 | some changes for 64bit machines. |
static int print_attach_list (LIST *lp, char op, char *name)
{
while (lp) {
printf("attachments %c%s %s/%s\n", op, name,
((ATTACH_MATCH *)lp->data)->major,
((ATTACH_MATCH *)lp->data)->minor);
lp = lp->next;
}
return 0;
} | 0 | [
"CWE-668"
] | mutt | 6d0624411a979e2e1d76af4dd97d03f47679ea4a | 175,482,662,465,029,000,000,000,000,000,000,000,000 | 11 | use a 64-bit random value in temporary filenames.
closes #3158 |
TO_EDGE_CONN(connection_t *c)
{
tor_assert(c->magic == EDGE_CONNECTION_MAGIC ||
c->magic == ENTRY_CONNECTION_MAGIC);
return DOWNCAST(edge_connection_t, c);
} | 0 | [
"CWE-532"
] | tor | 80c404c4b79f3bcba3fc4585d4c62a62a04f3ed9 | 334,713,317,825,546,500,000,000,000,000,000,000,000 | 6 | Log warning when connecting to soon-to-be-deprecated v2 onions. |
static inline bool svm_nested_virtualize_tpr(struct kvm_vcpu *vcpu)
{
return is_guest_mode(vcpu) && (vcpu->arch.hflags & HF_VINTR_MASK);
} | 0 | [
"CWE-401"
] | linux | d80b64ff297e40c2b6f7d7abc1b3eba70d22a068 | 6,452,856,159,503,168,000,000,000,000,000,000,000 | 4 | KVM: SVM: Fix potential memory leak in svm_cpu_init()
When kmalloc memory for sd->sev_vmcbs failed, we forget to free the page
held by sd->save_area. Also get rid of the var r as '-ENOMEM' is actually
the only possible outcome here.
Reviewed-by: Liran Alon <liran.alon@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuzne... |
void diff_flush(struct diff_options *options)
{
struct diff_queue_struct *q = &diff_queued_diff;
int i, output_format = options->output_format;
int separator = 0;
/*
* Order: raw, stat, summary, patch
* or: name/name-status/checkdiff (other bits clear)
*/
if (!q->nr)
goto free_queue;
if (output_forma... | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 308,738,556,650,741,360,000,000,000,000,000,000,000 | 82 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static void qemu_chr_socket_restart_timer(CharDriverState *chr)
{
TCPCharDriver *s = chr->opaque;
assert(s->connected == 0);
s->reconnect_timer = g_timeout_add_seconds(s->reconnect_time,
socket_reconnect_timeout, chr);
} | 0 | [
"CWE-416"
] | qemu | a4afa548fc6dd9842ed86639b4d37d4d1c4ad480 | 31,060,744,818,248,140,000,000,000,000,000,000,000 | 7 | char: move front end handlers in CharBackend
Since the hanlders are associated with a CharBackend, rather than the
CharDriverState, it is more appropriate to store in CharBackend. This
avoids the handler copy dance in qemu_chr_fe_set_handlers() then
mux_chr_update_read_handler(), by storing the CharBackend pointer
dir... |
md_fnv1a(unsigned base, const void* data, size_t n)
{
const unsigned char* buf = (const unsigned char*) data;
unsigned hash = base;
size_t i;
for(i = 0; i < n; i++) {
hash ^= buf[i];
hash *= MD_FNV1A_PRIME;
}
return hash;
} | 0 | [
"CWE-125",
"CWE-908"
] | md4c | 4fc808d8fe8d8904f8525bb4231d854f45e23a19 | 317,044,534,151,958,360,000,000,000,000,000,000,000 | 13 | md_analyze_line: Avoid reading 1 byte beyond the input size.
Fixes #155. |
ofputil_decode_table_status(const struct ofp_header *oh,
struct ofputil_table_status *ts)
{
const struct ofp14_table_status *ots;
struct ofpbuf b;
enum ofperr error;
enum ofpraw raw;
ofpbuf_use_const(&b, oh, ntohs(oh->length));
raw = ofpraw_pull_assert(&b);
ots =... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 85,104,724,379,600,280,000,000,000,000,000,000,000 | 27 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
}
static JSValue js_sys_mkdir(JSContext *ctx, JSValueConst this_val, int argc, JSValueConst *argv)
{
return js_sys_file_opt(ctx, this_val, argc, argv, OPT_MKDIR); | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 116,280,238,059,095,600,000,000,000,000,000,000,000 | 4 | fixed #2138 |
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 | [
"CWE-476"
] | linux-2.6 | 9d1ac65a9698513d00e5608d93fca0c53f536c14 | 318,666,042,251,779,730,000,000,000,000,000,000,000 | 78 | KEYS: Fix RCU no-lock warning in keyctl_session_to_parent()
There's an protected access to the parent process's credentials in the middle
of keyctl_session_to_parent(). This results in the following RCU warning:
===================================================
[ INFO: suspicious rcu_dereference_check() usage.... |
compat_copy_entry_to_user(struct ip6t_entry *e, void __user **dstptr,
unsigned int *size, struct xt_counters *counters,
unsigned int i)
{
struct xt_entry_target *t;
struct compat_ip6t_entry __user *ce;
u_int16_t target_offset, next_offset;
compat_uint_t origsize;
const struct xt_entry_match *ematch;
int... | 0 | [
"CWE-200"
] | linux-2.6 | 6a8ab060779779de8aea92ce3337ca348f973f54 | 319,599,852,619,286,920,000,000,000,000,000,000,000 | 37 | ipv6: netfilter: ip6_tables: fix infoleak to userspace
Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sen... |
static opj_image_t* bmp8toimage(const OPJ_UINT8* pData, OPJ_UINT32 stride,
opj_image_t* image, OPJ_UINT8 const* const* pLUT)
{
OPJ_UINT32 width, height;
const OPJ_UINT8 *pSrc = NULL;
width = image->comps[0].w;
height = image->comps[0].h;
pSrc = pData + (height - 1U... | 0 | [
"CWE-119",
"CWE-787"
] | openjpeg | baf0c1ad4572daa89caa3b12985bdd93530f0dd7 | 69,154,879,923,229,630,000,000,000,000,000,000,000 | 28 | bmp_read_info_header(): reject bmp files with biBitCount == 0 (#983) |
flatpak_remote_state_new (void)
{
FlatpakRemoteState *state = g_new0 (FlatpakRemoteState, 1);
state->refcount = 1;
state->sideload_repos = g_ptr_array_new_with_free_func ((GDestroyNotify)flatpak_sideload_state_free);
state->subsummaries = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify)... | 0 | [
"CWE-74"
] | flatpak | fb473cad801c6b61706353256cab32330557374a | 263,553,357,457,465,880,000,000,000,000,000,000,000 | 9 | dir: Pass environment via bwrap --setenv when running apply_extra
This means we can systematically pass the environment variables
through bwrap(1), even if it is setuid and thus is filtering out
security-sensitive environment variables. bwrap ends up being
run with an empty environment instead.
As with the previous c... |
static bool zone_allows_reclaim(struct zone *local_zone, struct zone *zone)
{
return true;
} | 0 | [] | linux | 400e22499dd92613821374c8c6c88c7225359980 | 131,618,826,779,284,340,000,000,000,000,000,000,000 | 4 | mm: don't warn about allocations which stall for too long
Commit 63f53dea0c98 ("mm: warn about allocations which stall for too
long") was a great step for reducing possibility of silent hang up
problem caused by memory allocation stalls. But this commit reverts it,
for it is possible to trigger OOM lockup and/or soft... |
void operator()(OpKernelContext* context, const T1* input_data,
int input_batches, int input_height, int input_width,
int input_depth, int input_offset, const T2* filter_data,
int filter_height, int filter_width, int filter_count,
int filter_offs... | 0 | [
"CWE-20",
"CWE-476"
] | tensorflow | 0f0b080ecde4d3dfec158d6f60da34d5e31693c4 | 33,230,209,734,889,010,000,000,000,000,000,000,000 | 253 | Fix undefined behavior in QuantizedConv2D
Added more input validation and tests. Prior to this, we could get
`nullptr` exceptions when attempting to access 0th elements of 0-sized
inputs, leading to security vulnerability bugs.
Also needed to modify `quantized_conv_ops_test.cc` for consistency.
Previously the CPU ke... |
static void ldb_dn_mark_invalid(struct ldb_dn *dn)
{
dn->invalid = true;
} | 0 | [
"CWE-200"
] | samba | 7f51ec8c4ed9ba1f53d722e44fb6fb3cde933b72 | 93,292,605,910,564,180,000,000,000,000,000,000,000 | 4 | CVE-2015-5330: ldb_dn: simplify and fix ldb_dn_escape_internal()
Previously we relied on NUL terminated strings and jumped back and
forth between copying escaped bytes and memcpy()ing un-escaped chunks.
This simple version is easier to reason about and works with
unterminated strings. It may also be faster as it avoid... |
static int sctp_disconnect(struct sock *sk, int flags)
{
return -EOPNOTSUPP; /* STUB */
} | 0 | [
"CWE-617",
"CWE-362"
] | linux | 2dcab598484185dea7ec22219c76dcdd59e3cb90 | 309,291,468,079,556,160,000,000,000,000,000,000,000 | 4 | sctp: avoid BUG_ON on sctp_wait_for_sndbuf
Alexander Popov reported that an application may trigger a BUG_ON in
sctp_wait_for_sndbuf if the socket tx buffer is full, a thread is
waiting on it to queue more data and meanwhile another thread peels off
the association being used by the first thread.
This patch replaces ... |
inline bool Virtual_column_info::is_equal(const Virtual_column_info* vcol) const
{
return type_handler() == vcol->type_handler()
&& stored_in_db == vcol->is_stored()
&& expr->eq(vcol->expr, true);
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 79,590,138,679,955,325,000,000,000,000,000,000,000 | 6 | 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 ... |
xmlDocPtr soap_xmlParseMemory(const void *buf, size_t buf_size)
{
xmlParserCtxtPtr ctxt = NULL;
xmlDocPtr ret;
/*
xmlInitParser();
*/
ctxt = xmlCreateMemoryParserCtxt(buf, buf_size);
if (ctxt) {
ctxt->options -= XML_PARSE_DTDLOAD;
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace;
ctxt->sax->comment... | 1 | [
"CWE-200"
] | php-src | 188c196d4da60bdde9190d2fc532650d17f7af2d | 58,278,029,812,532,210,000,000,000,000,000,000,000 | 46 | Proper bit reset code |
static int check_xflags(unsigned int flags)
{
if (flags & ~(FS_XFLAG_APPEND | FS_XFLAG_IMMUTABLE | FS_XFLAG_NOATIME |
FS_XFLAG_NODUMP | FS_XFLAG_SYNC))
return -EOPNOTSUPP;
return 0;
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 264,579,627,398,758,340,000,000,000,000,000,000,000 | 7 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
HttpHeader::operator =(const HttpHeader &other)
{
if (this != &other) {
// we do not really care, but the caller probably does
assert(owner == other.owner);
clean();
update(&other); // will update the mask as well
len = other.len;
conflictingContentLength_ = other.con... | 1 | [
"CWE-444"
] | squid | fd68382860633aca92065e6c343cfd1b12b126e7 | 143,322,972,738,858,370,000,000,000,000,000,000,000 | 12 | Improve Transfer-Encoding handling (#702)
Reject messages containing Transfer-Encoding header with coding other
than chunked or identity. Squid does not support other codings.
For simplicity and security sake, also reject messages where
Transfer-Encoding contains unnecessary complex values that are
technically equiva... |
int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
struct ext4_map_blocks *map, int flags)
{
struct ext4_ext_path *path = NULL;
struct ext4_extent newex, *ex, *ex2;
struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
ext4_fsblk_t newblock = 0;
int free_on_err = 0, err = 0, depth, ret;
unsigned int all... | 0 | [
"CWE-17"
] | linux | 0f2af21aae11972fa924374ddcf52e88347cf5a8 | 238,282,362,326,712,050,000,000,000,000,000,000,000 | 364 | ext4: allocate entire range in zero range
Currently there is a bug in zero range code which causes zero range
calls to only allocate block aligned portion of the range, while
ignoring the rest in some cases.
In some cases, namely if the end of the range is past i_size, we do
attempt to preallocate the last nonaligned... |
static char *analysis_fcn_autoname(RzCore *core, RzAnalysisFunction *fcn, int dump, int mode) {
int use_getopt = 0;
int use_isatty = 0;
PJ *pj = NULL;
char *do_call = NULL;
RzAnalysisXRef *xref;
RzListIter *iter;
RzList *xrefs = rz_analysis_function_get_xrefs_from(fcn);
if (mode == 'j') {
// start a new JSON ... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 302,664,909,197,692,230,000,000,000,000,000,000,000 | 100 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
static void fill_inode_item(struct btrfs_trans_handle *trans,
struct extent_buffer *leaf,
struct btrfs_inode_item *item,
struct inode *inode)
{
btrfs_set_inode_uid(leaf, item, i_uid_read(inode));
btrfs_set_inode_gid(leaf, item, i_gid_read(inode));
btrfs_set_inode_size(leaf, item, BTRFS_I(inode)-... | 0 | [
"CWE-310"
] | linux-2.6 | 9c52057c698fb96f8f07e7a4bcf4801a092bda89 | 63,747,244,072,778,990,000,000,000,000,000,000,000 | 34 | Btrfs: fix hash overflow handling
The handling for directory crc hash overflows was fairly obscure,
split_leaf returns EOVERFLOW when we try to extend the item and that is
supposed to bubble up to userland. For a while it did so, but along the
way we added better handling of errors and forced the FS readonly if we
hi... |
nfsd4_putfh(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
union nfsd4_op_u *u)
{
struct nfsd4_putfh *putfh = &u->putfh;
fh_put(&cstate->current_fh);
cstate->current_fh.fh_handle.fh_size = putfh->pf_fhlen;
memcpy(&cstate->current_fh.fh_handle.fh_base, putfh->pf_fhval,
putfh->pf_fhlen);
... | 0 | [
"CWE-476"
] | linux | 01310bb7c9c98752cc763b36532fab028e0f8f81 | 299,460,339,583,096,460,000,000,000,000,000,000,000 | 11 | nfsd: COPY and CLONE operations require the saved filehandle to be set
Make sure we have a saved filehandle, otherwise we'll oops with a null
pointer dereference in nfs4_preprocess_stateid_op().
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.... |
scanner_scan_statement (parser_context_t *context_p, /**< context */
scanner_context_t *scanner_context_p, /**< scanner context */
lexer_token_type_t type, /**< current token type */
scan_stack_modes_t stack_top) /**< current stack top */
{
switc... | 0 | [
"CWE-476",
"CWE-703",
"CWE-754"
] | jerryscript | 69f8e78c2f8d562bd6d8002b5488f1662ac30d24 | 58,151,765,943,309,890,000,000,000,000,000,000,000 | 822 | Fix error handling in scanner when in case of OOM (#3793)
This patch fixes #3786 and fixes #3788.
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu |
gdImagePtr gdImageCreateFromJpegPtrEx (int size, void *data, int ignore_warning)
{
gdImagePtr im;
gdIOCtx *in = gdNewDynamicCtxEx(size, data, 0);
im = gdImageCreateFromJpegCtxEx(in, ignore_warning);
in->gd_free(in);
return im;
} | 0 | [
"CWE-415"
] | php-src | 089f7c0bc28d399b0420aa6ef058e4c1c120b2ae | 16,282,597,878,218,798,000,000,000,000,000,000,000 | 9 | Sync with upstream
Even though libgd/libgd#492 is not a relevant bug fix for PHP, since
the binding doesn't use the `gdImage*Ptr()` functions at all, we're
porting the fix to stay in sync here. |
static MagickBooleanType SetsRGBImageProfile(Image *image,
ExceptionInfo *exception)
{
static unsigned char
sRGBProfile[] =
{
0x00, 0x00, 0x0c, 0x8c, 0x61, 0x72, 0x67, 0x6c, 0x02, 0x20, 0x00, 0x00,
0x6d, 0x6e, 0x74, 0x72, 0x52, 0x47, 0x42, 0x20, 0x58, 0x59, 0x5a, 0x20,
0x07, 0xde, 0x00, 0x... | 0 | [
"CWE-190",
"CWE-125"
] | ImageMagick | d8ab7f046587f2e9f734b687ba7e6e10147c294b | 36,919,084,919,901,760,000,000,000,000,000,000,000 | 292 | Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed) |
static void SFDDumpHintList(FILE *sfd,const char *key, StemInfo *h) {
HintInstance *hi;
if ( h==NULL )
return;
fprintf(sfd, "%s", key );
for ( ; h!=NULL; h=h->next ) {
fprintf(sfd, "%g %g", (double) h->start,(double) h->width );
if ( h->ghost ) putc('G',sfd);
if ( h->where!=NULL ) {
putc('<',sf... | 0 | [
"CWE-416"
] | fontforge | 048a91e2682c1a8936ae34dbc7bd70291ec05410 | 191,601,069,801,655,200,000,000,000,000,000,000,000 | 17 | Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function
Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function
Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function
Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many
other potential issues (... |
e_ews_config_utils_open_connection_for (ESource *source,
CamelEwsSettings *ews_settings,
const gchar *connect_url,
EEwsConfigUtilTryCredentialsFunc try_credentials_func,
gpointer user_data,
GCancellable *cancellable,
... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 46,219,290,291,396,540,000,000,000,000,000,000,000 | 84 | 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 |
void __kprobes sub_preempt_count(int val)
{
#ifdef CONFIG_DEBUG_PREEMPT
/*
* Underflow?
*/
if (DEBUG_LOCKS_WARN_ON(val > preempt_count()))
return;
/*
* Is the spinlock portion underflowing?
*/
if (DEBUG_LOCKS_WARN_ON((val < PREEMPT_MASK) &&
!(preempt_count() & PREEMPT_MASK)))
return;
#endif
if (pre... | 0 | [
"CWE-703",
"CWE-835"
] | linux | f26f9aff6aaf67e9a430d16c266f91b13a5bff64 | 230,665,976,062,130,400,000,000,000,000,000,000,000 | 20 | Sched: fix skip_clock_update optimization
idle_balance() drops/retakes rq->lock, leaving the previous task
vulnerable to set_tsk_need_resched(). Clear it after we return
from balancing instead, and in setup_thread_stack() as well, so
no successfully descheduled or never scheduled task has it set.
Need resched confus... |
R_API double my_pow(ut64 base, int exp) {
ut8 flag = 0;
ut64 res = 1;
if (exp < 0) {
flag = 1;
exp *= -1;
}
while (exp) {
if (exp & 1) {
res *= base;
}
exp >>= 1;
base *= base;
IFDBG eprintf("Result: %"PFMT64d ", base: %"PFMT64d ", exp: %d\n", res, base, exp);
}
if (flag == 0) {
return 1.0 * r... | 0 | [
"CWE-787"
] | radare2 | 9650e3c352f675687bf6c6f65ff2c4a3d0e288fa | 132,065,880,712,765,940,000,000,000,000,000,000,000 | 20 | Fix oobread segfault in java arith8.class ##crash
* Reported by Cen Zhang via huntr.dev |
ippTimeToDate(time_t t) /* I - Time in seconds */
{
struct tm *unixdate; /* UNIX unixdate/time info */
ipp_uchar_t *date = _cupsGlobals()->ipp_date;
/* RFC-2579 date/time data */
/*
* RFC-2579 date/time format is:
*
* Byte(s) Description
* ------- -----------
* 0-1 Year (0 to 65... | 0 | [
"CWE-120"
] | cups | f24e6cf6a39300ad0c3726a41a4aab51ad54c109 | 100,678,836,465,821,180,000,000,000,000,000,000,000 | 41 | Fix multiple security/disclosure issues:
- CVE-2019-8696 and CVE-2019-8675: Fixed SNMP buffer overflows (rdar://51685251)
- Fixed IPP buffer overflow (rdar://50035411)
- Fixed memory disclosure issue in the scheduler (rdar://51373853)
- Fixed DoS issues in the scheduler (rdar://51373929) |
jbd2_get_transaction(journal_t *journal, transaction_t *transaction)
{
transaction->t_journal = journal;
transaction->t_state = T_RUNNING;
transaction->t_start_time = ktime_get();
transaction->t_tid = journal->j_transaction_sequence++;
transaction->t_expires = jiffies + journal->j_commit_interval;
spin_lock_init(... | 0 | [
"CWE-787"
] | linux | e09463f220ca9a1a1ecfda84fcda658f99a1f12a | 295,856,512,080,542,840,000,000,000,000,000,000,000 | 27 | jbd2: don't mark block as modified if the handle is out of credits
Do not set the b_modified flag in block's journal head should not
until after we're sure that jbd2_journal_dirty_metadat() will not
abort with an error due to there not being enough space reserved in
the jbd2 handle.
Otherwise, future attempts to modi... |
bool Scanner::include(const std::string &filename)
{
// get name of the current file (before unreading)
DASSERT(!files.empty());
const std::string &parent = files.back()->escaped_name;
// unread buffer tail: we'll return to it later
// In the buffer nested files go before outer files. In the file s... | 0 | [
"CWE-787"
] | re2c | c4603ba5ce229db83a2a4fb93e6d4b4e3ec3776a | 29,081,583,238,915,933,000,000,000,000,000,000,000 | 40 | Fix crash in lexer refill (reported by Agostino Sarubbo).
The crash happened in a rare case of a very long lexeme that doen't fit
into the buffer, forcing buffer reallocation.
The crash was caused by an incorrect calculation of the shift offset
(it was smaller than necessary). As a consequence, the data from buffer
s... |
int32_t ByteArray::Get(int32_t index) {
if (index < 0 || index >= Length())
return -1;
return InternalGet(index) & 0xff;
} | 0 | [
"CWE-119",
"CWE-703"
] | sfntly | c56b85408bab232efd7e650f0994272a174e3b92 | 94,767,916,537,540,140,000,000,000,000,000,000,000 | 5 | Add a bounds check to ByteArray::Get(). |
void CLASS linear_table(unsigned len)
{
int i;
if (len > 0x10000)
len = 0x10000;
else if(len < 1)
return;
read_shorts(curve, len);
for (i = len; i < 0x10000; i++)
curve[i] = curve[i - 1];
maximum = curve[len < 0x1000 ? 0xfff : len - 1];
} | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 317,880,333,959,918,970,000,000,000,000,000,000,000 | 12 | parse_qt: possible integer overflow |
static bool getsockopt_needs_rtnl(int optname)
{
switch (optname) {
case IP_MSFILTER:
case MCAST_MSFILTER:
return true;
}
return false;
} | 0 | [
"CWE-476",
"CWE-284"
] | linux | 34b2cef20f19c87999fff3da4071e66937db9644 | 267,412,408,575,202,260,000,000,000,000,000,000,000 | 9 | ipv4: keep skb->dst around in presence of IP options
Andrey Konovalov got crashes in __ip_options_echo() when a NULL skb->dst
is accessed.
ipv4_pktinfo_prepare() should not drop the dst if (evil) IP options
are present.
We could refine the test to the presence of ts_needtime or srr,
but IP options are not often used... |
static int session_process_altsvc_frame(nghttp2_session *session) {
nghttp2_inbound_frame *iframe = &session->iframe;
nghttp2_frame *frame = &iframe->frame;
nghttp2_frame_unpack_altsvc_payload(
&frame->ext, nghttp2_get_uint16(iframe->sbuf.pos), iframe->lbuf.pos,
nghttp2_buf_len(&iframe->lbuf));
/*... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 101,853,864,712,945,730,000,000,000,000,000,000,000 | 14 | Add nghttp2_option_set_max_outbound_ack |
txt_add_fragment(gx_device_txtwrite_t *tdev, textw_text_enum_t *penum)
{
text_list_entry_t *unsorted_entry, *t;
/* Create a duplicate entry for the unsorted list */
unsorted_entry = (text_list_entry_t *)gs_malloc(tdev->memory->stable_memory, 1,
sizeof(text_list_entry_t), "txtwrite alloc sorted ... | 0 | [
"CWE-476"
] | ghostpdl | 407c98a38c3a6ac1681144ed45cc2f4fc374c91f | 309,275,222,713,538,170,000,000,000,000,000,000,000 | 68 | txtwrite - guard against using GS_NO_GLYPH to retrieve Unicode values
Bug 701822 "Segmentation fault at psi/iname.c:296 in names_index_ref"
Avoid using a glyph with the value GS_NO_GLYPH to retrieve a glyph
name or Unicode code point from the glyph ID, as this is not a valid
ID. |
int g_dhcpv6_client_set_ia(GDHCPClient *dhcp_client, int index,
int code, uint32_t *T1, uint32_t *T2,
bool add_iaaddr, const char *ia_na)
{
if (code == G_DHCPV6_IA_TA) {
uint8_t ia_options[4];
put_iaid(dhcp_client, index, ia_options);
g_dhcp_client_set_request(dhcp_client, G_DHCPV6_IA_TA);
g_dhcpv6_cli... | 0 | [] | connman | a74524b3e3fad81b0fd1084ffdf9f2ea469cd9b1 | 294,703,024,338,176,870,000,000,000,000,000,000,000 | 77 | gdhcp: Avoid leaking stack data via unitiialized variable
Fixes: CVE-2021-26676 |
GF_Err gf_isom_set_cts_packing(GF_ISOFile *the_file, u32 trackNumber, Bool unpack)
{
GF_Err e;
GF_Err stbl_repackCTS(GF_CompositionOffsetBox *ctts);
GF_Err stbl_unpackCTS(GF_SampleTableBox *stbl);
GF_SampleTableBox *stbl;
GF_TrackBox *trak = gf_isom_get_track_from_file(the_file, trackNumber);
if (!trak) return G... | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 247,251,770,704,113,720,000,000,000,000,000,000,000 | 24 | fixed #1706 |
static void gotoxay(struct vc_data *vc, int new_x, int new_y)
{
gotoxy(vc, new_x, vc->vc_decom ? (vc->vc_top + new_y) : new_y);
} | 0 | [
"CWE-125"
] | linux | 3c4e0dff2095c579b142d5a0693257f1c58b4804 | 306,165,377,031,881,700,000,000,000,000,000,000,000 | 4 | vt: Disable KD_FONT_OP_COPY
It's buggy:
On Fri, Nov 06, 2020 at 10:30:08PM +0800, Minh Yuan wrote:
> We recently discovered a slab-out-of-bounds read in fbcon in the latest
> kernel ( v5.10-rc2 for now ). The root cause of this vulnerability is that
> "fbcon_do_set_font" did not handle "vc->vc_font.data" and
> "vc->... |
TEST_F(GrpcHealthCheckerImplTest, GoAwayErrorProbeInProgress) {
// FailureType::Network will be issued, it will render host unhealthy only if unhealthy_threshold
// is reached.
setupHCWithUnhealthyThreshold(1);
expectSingleHealthcheck(HealthTransition::Changed);
EXPECT_CALL(event_logger_, logEjectUnhealthy(_,... | 0 | [
"CWE-476"
] | envoy | 9b1c3962172a972bc0359398af6daa3790bb59db | 73,792,627,718,021,860,000,000,000,000,000,000,000 | 17 | healthcheck: fix grpc inline removal crashes (#749)
Signed-off-by: Matt Klein <mklein@lyft.com>
Signed-off-by: Pradeep Rao <pcrao@google.com> |
int ssl3_send_server_key_exchange(SSL *s)
{
#ifndef OPENSSL_NO_RSA
unsigned char *q;
int j,num;
RSA *rsa;
unsigned char md_buf[MD5_DIGEST_LENGTH+SHA_DIGEST_LENGTH];
unsigned int u;
#endif
#ifndef OPENSSL_NO_DH
DH *dh=NULL,*dhp;
#endif
#ifndef OPENSSL_NO_ECDH
EC_KEY *ecdh=NULL, *ecdhp;
unsigned char *encodedPoi... | 0 | [] | openssl | 36ca4ba63d083da6f9d4598f18f17a8c32c8eca2 | 58,695,478,510,777,300,000,000,000,000,000,000,000 | 442 | Implement the Supported Point Formats Extension for ECC ciphersuites
Submitted by: Douglas Stebila |
PHP_FUNCTION(imagecopymergegray)
{
zval *SIM, *DIM;
zend_long SX, SY, SW, SH, DX, DY, PCT;
gdImagePtr im_dst, im_src;
int srcH, srcW, srcY, srcX, dstY, dstX, pct;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "rrlllllll", &DIM, &SIM, &DX, &DY, &SX, &SY, &SW, &SH, &PCT) == FAILURE) {
return;
}
if ((im_dst = (gdI... | 0 | [
"CWE-787"
] | php-src | 28022c9b1fd937436ab67bb3d61f652c108baf96 | 222,487,620,919,897,500,000,000,000,000,000,000,000 | 30 | Fix bug#72697 - select_colors write out-of-bounds
(cherry picked from commit b6f13a5ef9d6280cf984826a5de012a32c396cd4)
Conflicts:
ext/gd/gd.c |
void uwsgi_chown(char *filename, char *owner) {
uid_t new_uid = -1;
uid_t new_gid = -1;
struct group *new_group = NULL;
struct passwd *new_user = NULL;
char *colon = strchr(owner, ':');
if (colon) {
colon[0] = 0;
}
if (is_a_number(owner)) {
new_uid = atoi(owner);
}
else {
new_user = getpwnam(owner);... | 0 | [
"CWE-119",
"CWE-703",
"CWE-787"
] | uwsgi | cb4636f7c0af2e97a4eef7a3cdcbd85a71247bfe | 318,696,793,245,371,400,000,000,000,000,000,000,000 | 46 | improve uwsgi_expand_path() to sanitize input, avoiding stack corruption and potential security issue |
bool slaveOk() const override {
return false;
} | 0 | [
"CWE-20"
] | mongo | 5c7c6729c37514760fd34da462b6961a2e385417 | 279,478,886,689,775,800,000,000,000,000,000,000,000 | 3 | SERVER-38275 ban explain with UUID |
pipe_poll(struct file *filp, poll_table *wait)
{
__poll_t mask;
struct pipe_inode_info *pipe = filp->private_data;
unsigned int head, tail;
/* Epoll has some historical nasty semantics, this enables them */
pipe->poll_usage = 1;
/*
* Reading pipe state only -- no need for acquiring the semaphore.
*
* But ... | 0 | [
"CWE-362"
] | linux | 189b0ddc245139af81198d1a3637cac74f96e13a | 125,727,059,116,740,850,000,000,000,000,000,000,000 | 49 | pipe: Fix missing lock in pipe_resize_ring()
pipe_resize_ring() needs to take the pipe->rd_wait.lock spinlock to
prevent post_one_notification() from trying to insert into the ring
whilst the ring is being replaced.
The occupancy check must be done after the lock is taken, and the lock
must be taken after the new rin... |
GF_Err mp4s_on_child_box(GF_Box *s, GF_Box *a)
{
GF_MPEGSampleEntryBox *ptr = (GF_MPEGSampleEntryBox *)s;
switch (a->type) {
case GF_ISOM_BOX_TYPE_ESDS:
if (ptr->esd) ERROR_ON_DUPLICATED_BOX(a, ptr)
ptr->esd = (GF_ESDBox *)a;
break;
}
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 293,639,417,012,632,600,000,000,000,000,000,000,000 | 11 | fixed #1587 |
static int xudc_ep_dequeue(struct usb_ep *_ep, struct usb_request *_req)
{
struct xusb_ep *ep = to_xusb_ep(_ep);
struct xusb_req *req = to_xusb_req(_req);
struct xusb_udc *udc = ep->udc;
unsigned long flags;
spin_lock_irqsave(&udc->lock, flags);
/* Make sure it's actually queued on this endpoint */
list_for_eac... | 0 | [
"CWE-20",
"CWE-129"
] | linux | 7f14c7227f342d9932f9b918893c8814f86d2a0d | 14,814,057,677,754,341,000,000,000,000,000,000,000 | 22 | USB: gadget: validate endpoint index for xilinx udc
Assure that host may not manipulate the index to point
past endpoint array.
Signed-off-by: Szymon Heidrich <szymon.heidrich@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
EXPORTED void appendstrlist(struct strlist **l, char *s)
{
struct strlist **tail = l;
while (*tail) tail = &(*tail)->next;
*tail = (struct strlist *)xmalloc(sizeof(struct strlist));
(*tail)->s = xstrdup(s);
(*tail)->p = 0;
(*tail)->next = 0;
} | 0 | [
"CWE-732"
] | cyrus-imapd | 621f9e41465b521399f691c241181300fab55995 | 101,492,862,638,406,870,000,000,000,000,000,000,000 | 11 | annotate: don't allow everyone to write shared server entries |
static int xennet_xdp(struct net_device *dev, struct netdev_bpf *xdp)
{
struct netfront_info *np = netdev_priv(dev);
if (np->broken)
return -ENODEV;
switch (xdp->command) {
case XDP_SETUP_PROG:
return xennet_xdp_set(dev, xdp->prog, xdp->extack);
default:
return -EINVAL;
}
} | 0 | [] | linux | f63c2c2032c2e3caad9add3b82cc6e91c376fd26 | 5,836,469,699,959,389,000,000,000,000,000,000,000 | 14 | xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses()
The commit referenced below moved the invocation past the "next" label,
without any explanation. In fact this allows misbehaving backends undue
control over the domain the frontend runs in, as earlier detected errors
require the skb to not ... |
inline bool Row_definition_list::eq_name(const Spvar_definition *def,
const LEX_CSTRING *name) const
{
return def->field_name.length == name->length && my_strcasecmp(system_charset_info, def->field_name.str, name->str) == 0;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 5,020,663,537,975,311,000,000,000,000,000,000,000 | 5 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
void setRequestedApplicationProtocols(const std::vector<absl::string_view>& protocols) override {
application_protocols_.clear();
for (const auto& protocol : protocols) {
application_protocols_.emplace_back(protocol);
}
} | 0 | [
"CWE-400"
] | envoy | 542f84c66e9f6479bc31c6f53157c60472b25240 | 12,871,008,308,887,418,000,000,000,000,000,000,000 | 6 | overload: Runtime configurable global connection limits (#147)
Signed-off-by: Tony Allen <tony@allen.gg> |
static av_always_inline void snow_horizontal_compose_lift_lead_out(int i, IDWTELEM * dst, IDWTELEM * src, IDWTELEM * ref, int width, int w, int lift_high, int mul, int add, int shift){
for(; i<w; i++){
dst[i] = src[i] - ((mul * (ref[i] + ref[i + 1]) + add) >> shift);
}
if((width^lift_high)&1){
... | 0 | [
"CWE-703"
] | FFmpeg | 61d59703c91869f4e5cdacd8d6be52f8b89d4ba4 | 128,321,084,506,162,730,000,000,000,000,000,000,000 | 9 | avcodec/snow: split block clipping checks
Fixes out of array read
Fixes: d4476f68ca1c1c57afbc45806f581963-asan_heap-oob_2266b27_8607_cov_4044577381_snow_chroma_bug.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
ssize_t enc_untrusted_send(int sockfd, const void *buf, size_t len, int flags) {
return EnsureInitializedAndDispatchSyscall(asylo::system_call::kSYS_sendto,
sockfd, buf, len, flags,
/*dest_addr=*/nullptr,
... | 0 | [
"CWE-125"
] | asylo | b1d120a2c7d7446d2cc58d517e20a1b184b82200 | 329,247,936,179,992,520,000,000,000,000,000,000,000 | 6 | Check for return size in enc_untrusted_read
Check return size does not exceed requested. The returned result and
content still cannot be trusted, but it's expected behavior when not
using a secure file system.
PiperOrigin-RevId: 333827386
Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29 |
static void sdma_field_flush(struct work_struct *work)
{
unsigned long flags;
struct sdma_engine *sde =
container_of(work, struct sdma_engine, flush_worker);
write_seqlock_irqsave(&sde->head_lock, flags);
if (!__sdma_running(sde))
sdma_flush(sde);
write_sequnlock_irqrestore(&sde->head_lock, flags);
} | 0 | [
"CWE-400",
"CWE-401"
] | linux | 34b3be18a04ecdc610aae4c48e5d1b799d8689f6 | 165,575,515,232,253,210,000,000,000,000,000,000,000 | 11 | RDMA/hfi1: Prevent memory leak in sdma_init
In sdma_init if rhashtable_init fails the allocated memory for
tmp_sdma_rht should be released.
Fixes: 5a52a7acf7e2 ("IB/hfi1: NULL pointer dereference when freeing rhashtable")
Link: https://lore.kernel.org/r/20190925144543.10141-1-navid.emamdoost@gmail.com
Signed-off-by: ... |
write_applet_private_values_to_gconf (CopyOneSettingValueInfo *info)
{
NMSetting8021x *s_8021x;
g_return_if_fail (info != NULL);
/* Handle values private to the applet that are not supposed to
* be sent to NetworkManager.
*/
s_8021x = NM_SETTING_802_1X (nm_connection_get_setting (info->connection, NM_TYPE_SET... | 0 | [
"CWE-310"
] | network-manager-applet | 4020594dfbf566f1852f0acb36ad631a9e73a82b | 300,051,307,808,486,700,000,000,000,000,000,000,000 | 32 | core: fix CA cert mishandling after cert file deletion (deb #560067) (rh #546793)
If a connection was created with a CA certificate, but the user later
moved or deleted that CA certificate, the applet would simply provide the
connection to NetworkManager without any CA certificate. This could cause
NM to connect to t... |
resp_addr_get_rrset(struct resp_addr* addr)
{
return addr ? addr->data : NULL;
} | 0 | [
"CWE-190"
] | unbound | 02080f6b180232f43b77f403d0c038e9360a460f | 115,868,760,342,832,380,000,000,000,000,000,000,000 | 4 | - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec. |
void streamPropagateGroupID(client *c, robj *key, streamCG *group, robj *groupname) {
robj *argv[7];
argv[0] = shared.xgroup;
argv[1] = shared.setid;
argv[2] = key;
argv[3] = groupname;
argv[4] = createObjectFromStreamID(&group->last_id);
argv[5] = shared.entriesread;
argv[6] = createStr... | 0 | [
"CWE-703",
"CWE-401"
] | redis | 4a7a4e42db8ff757cdf3f4a824f66426036034ef | 37,531,282,854,584,387,000,000,000,000,000,000,000 | 15 | Fix memory leak in streamGetEdgeID (#10753)
si is initialized by streamIteratorStart(), we should call
streamIteratorStop() on it when done.
regression introduced in #9127 (redis 7.0) |
_public_ sd_bus *sd_bus_close_unref(sd_bus *bus) {
if (!bus)
return NULL;
sd_bus_close(bus);
return sd_bus_unref(bus);
} | 0 | [
"CWE-416"
] | systemd | 1068447e6954dc6ce52f099ed174c442cb89ed54 | 183,066,412,597,020,100,000,000,000,000,000,000,000 | 8 | sd-bus: introduce API for re-enqueuing incoming messages
When authorizing via PolicyKit we want to process incoming method calls
twice: once to process and figure out that we need PK authentication,
and a second time after we aquired PK authentication to actually execute
the operation. With this new call sd_bus_enqueu... |
uint32_t
router_get_advertised_bandwidth_capped(const routerinfo_t *router)
{
uint32_t result = router->bandwidthcapacity;
if (result > router->bandwidthrate)
result = router->bandwidthrate;
if (result > DEFAULT_MAX_BELIEVABLE_BANDWIDTH)
result = DEFAULT_MAX_BELIEVABLE_BANDWIDTH;
return result; | 0 | [] | tor | 1afc2ed956a35b40dfd1d207652af5b50c295da7 | 150,685,103,315,728,370,000,000,000,000,000,000,000 | 9 | Fix policies.c instance of the "if (r=(a-b)) return r" pattern
I think this one probably can't underflow, since the input ranges
are small. But let's not tempt fate.
This patch also replaces the "cmp" functions here with just "eq"
functions, since nothing actually checked for anything besides 0 and
nonzero.
Related... |
static inline int attributes_need_mount(u32 *bmval)
{
if (bmval[0] & ~(FATTR4_WORD0_RDATTR_ERROR | FATTR4_WORD0_LEASE_TIME))
return 1;
if (bmval[1] & ~FATTR4_WORD1_MOUNTED_ON_FILEID)
return 1;
return 0;
} | 0 | [
"CWE-20",
"CWE-129"
] | linux | f961e3f2acae94b727380c0b74e2d3954d0edf79 | 335,671,065,975,038,250,000,000,000,000,000,000,000 | 8 | nfsd: encoders mustn't use unitialized values in error cases
In error cases, lgp->lg_layout_type may be out of bounds; so we
shouldn't be using it until after the check of nfserr.
This was seen to crash nfsd threads when the server receives a LAYOUTGET
request with a large layout type.
GETDEVICEINFO has the same pro... |
GF_Err mdat_Size(GF_Box *s)
{
GF_MediaDataBox *ptr = (GF_MediaDataBox *)s;
ptr->size += ptr->dataSize;
return GF_OK;
} | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 175,060,773,739,890,500,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
SSL_COMP *ssl3_comp_find(STACK_OF(SSL_COMP) *sk, int n)
{
SSL_COMP *ctmp;
int i,nn;
if ((n == 0) || (sk == NULL)) return(NULL);
nn=sk_SSL_COMP_num(sk);
for (i=0; i<nn; i++)
{
ctmp=sk_SSL_COMP_value(sk,i);
if (ctmp->id == n)
return(ctmp);
}
return(NULL);
} | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 181,869,739,695,390,770,000,000,000,000,000,000,000 | 15 | Add SRP support. |
cupsdCloseClient(cupsd_client_t *con) /* I - Client to close */
{
int partial; /* Do partial close for SSL? */
cupsdLogClient(con, CUPSD_LOG_DEBUG, "Closing connection.");
/*
* Flush pending writes before closing...
*/
httpFlushWrite(con->http);
partial = 0;
if (con->pipe_pid != 0)
{
/*
... | 0 | [
"CWE-290"
] | cups | afa80cb2b457bf8d64f775bed307588610476c41 | 234,637,688,550,274,280,000,000,000,000,000,000,000 | 140 | Don't treat "localhost.localdomain" as an allowed replacement for localhost, since it isn't. |
static void FVToggleCharSelected(FontView *fv,int enc) {
int i, j;
if ( fv->v==NULL || fv->colcnt==0 ) /* Can happen in scripts */
return;
i = enc / fv->colcnt;
j = enc - i*fv->colcnt;
i -= fv->rowoff;
/* Normally we should be checking against fv->rowcnt (rather than <=rowcnt) */
/* but every n... | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 255,319,132,886,800,260,000,000,000,000,000,000,000 | 16 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static int enter_vmx_non_root_mode(struct kvm_vcpu *vcpu, bool from_vmentry)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
struct loaded_vmcs *vmcs02;
u32 msr_entry_idx;
u32 exit_qual;
vmcs02 = nested_get_current_vmcs02(vmx);
if (!vmcs02)
return -ENOMEM;
enter_guest_mode(v... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 3a8b0677fc6180a467e26cc32ce6b0c09a32f9bb | 50,167,333,725,516,310,000,000,000,000,000,000,000 | 49 | KVM: VMX: Do not BUG() on out-of-bounds guest IRQ
The value of the guest_irq argument to vmx_update_pi_irte() is
ultimately coming from a KVM_IRQFD API call. Do not BUG() in
vmx_update_pi_irte() if the value is out-of bounds. (Especially,
since KVM as a whole seems to hang after that.)
Instead, print a message only o... |
static int mov_init(AVFormatContext *s)
{
MOVMuxContext *mov = s->priv_data;
AVDictionaryEntry *global_tcr = av_dict_get(s->metadata, "timecode", NULL, 0);
int i, ret;
mov->fc = s;
/* Default mode == MP4 */
mov->mode = MODE_MP4;
if (s->oformat) {
if (!strcmp("3gp", s->oformat->nam... | 0 | [
"CWE-125"
] | FFmpeg | 95556e27e2c1d56d9e18f5db34d6f756f3011148 | 2,514,535,081,057,900,500,000,000,000,000,000,000 | 314 | avformat/movenc: Do not pass AVCodecParameters in avpriv_request_sample
Fixes: out of array read
Fixes: ffmpeg_crash_8.avi
Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
xfs_bmapi_reserve_delalloc(
struct xfs_inode *ip,
int whichfork,
xfs_fileoff_t off,
xfs_filblks_t len,
xfs_filblks_t prealloc,
struct xfs_bmbt_irec *got,
struct xfs_iext_cursor *icur,
int eof)
{
struct xfs_mount *mp = ip->i_mount;
struct xfs_ifork *ifp = XFS_IFORK_PTR(ip, whichfork);
xfs_extlen_t ale... | 0 | [] | linux | 2c4306f719b083d17df2963bc761777576b8ad1b | 125,084,559,861,947,280,000,000,000,000,000,000,000 | 95 | xfs: set format back to extents if xfs_bmap_extents_to_btree
If xfs_bmap_extents_to_btree fails in a mode where we call
xfs_iroot_realloc(-1) to de-allocate the root, set the
format back to extents.
Otherwise we can assume we can dereference ifp->if_broot
based on the XFS_DINODE_FMT_BTREE format, and crash.
Bugzilla... |
static int svm_check_intercept(struct kvm_vcpu *vcpu,
struct x86_instruction_info *info,
enum x86_intercept_stage stage,
struct x86_exception *exception)
{
struct vcpu_svm *svm = to_svm(vcpu);
int vmexit, ret = X86EMUL_CONTINUE;
struct __x86_intercept icpt_info;
struct vmcb *vmcb = svm... | 0 | [
"CWE-703"
] | linux | 6cd88243c7e03845a450795e134b488fc2afb736 | 334,881,408,595,264,800,000,000,000,000,000,000,000 | 119 | KVM: x86: do not report a vCPU as preempted outside instruction boundaries
If a vCPU is outside guest mode and is scheduled out, it might be in the
process of making a memory access. A problem occurs if another vCPU uses
the PV TLB flush feature during the period when the vCPU is scheduled
out, and a virtual address ... |
static VALUE read_memory(int argc, VALUE *argv, VALUE klass)
{
VALUE content;
VALUE parse_options;
int parse_options_int;
xmlSchemaParserCtxtPtr ctx;
xmlSchemaPtr schema;
VALUE errors;
VALUE rb_schema;
int scanned_args = 0;
scanned_args = rb_scan_args(argc, argv, "11", &content, &parse_options);
if... | 0 | [
"CWE-611",
"CWE-703"
] | nokogiri | 9c87439d9afa14a365ff13e73adc809cb2c3d97b | 334,909,212,581,692,700,000,000,000,000,000,000,000 | 51 | feat: XML::Schema and RelaxNG creation accept optional ParseOptions
I'm trying out a new pattern, which is that the parsed object carries
around the ParseOptions it was created with, which should make some
testing a bit easier.
I'm also not implementing the "config block" pattern in use for
Documents, because I think... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.