func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static inline void __init drbg_fill_array(struct rng_alg *alg,
const struct drbg_core *core, int pr)
{
int pos = 0;
static int priority = 100;
memcpy(alg->base.cra_name, "stdrng", 6);
if (pr) {
memcpy(alg->base.cra_driver_name, "drbg_pr_", 8);
pos = 8;
} else {
memcpy(alg->base.cra_driver_name, "drbg... | 0 | [
"CWE-476"
] | linux | 8fded5925d0a733c46f8d0b5edd1c9b315882b1d | 7,587,099,226,365,290,000,000,000,000,000,000,000 | 36 | crypto: drbg - Convert to new rng interface
This patch converts the DRBG implementation to the new low-level
rng interface.
This allows us to get rid of struct drbg_gen by using the new RNG
API instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Stephan Mueller <smueller@chronox.de> |
static void smb_vfs_call_pwrite_done(struct tevent_req *subreq)
{
struct tevent_req *req = tevent_req_callback_data(
subreq, struct tevent_req);
struct smb_vfs_call_pwrite_state *state = tevent_req_data(
req, struct smb_vfs_call_pwrite_state);
int err;
state->retval = state->recv_fn(subreq, &err);
TALLOC_FREE... | 0 | [
"CWE-264"
] | samba | 4278ef25f64d5fdbf432ff1534e275416ec9561e | 211,694,743,107,637,400,000,000,000,000,000,000,000 | 16 | 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> |
longlong Item_sum_udf_int::val_int()
{
my_bool tmp_null_value;
longlong res;
DBUG_ASSERT(fixed == 1);
DBUG_ENTER("Item_sum_udf_int::val_int");
DBUG_PRINT("info",("result_type: %d arg_count: %d",
args[0]->result_type(), arg_count));
res= udf.val_int(&tmp_null_value);
null_value= tmp_null_value;
D... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 243,738,361,253,936,800,000,000,000,000,000,000,000 | 12 | 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... |
void t_cpp_generator::generate_enum(t_enum* tenum) {
vector<t_enum_value*> constants = tenum->get_constants();
std::string enum_name = tenum->get_name();
if (!gen_pure_enums_) {
enum_name = "type";
f_types_ << indent() << "struct " << tenum->get_name() << " {" << endl;
indent_up();
}
f_types_ << ... | 0 | [
"CWE-20"
] | thrift | cfaadcc4adcfde2a8232c62ec89870b73ef40df1 | 51,255,637,132,904,010,000,000,000,000,000,000,000 | 46 | THRIFT-3231 CPP: Limit recursion depth to 64
Client: cpp
Patch: Ben Craig <bencraig@apache.org> |
Dispatcher::Device::Device(Dispatcher & parent, cl_context & clContext, cl_program & clProgram, cl_device_id clDeviceId, const size_t worksizeLocal, const size_t size, const size_t index, const Mode & mode) :
m_parent(parent),
m_index(index),
m_clDeviceId(clDeviceId),
m_worksizeLocal(worksizeLocal),
m_clScoreMax(0... | 0 | [
"CWE-703"
] | profanity | 69ff010c14ff80ec14246772db6a245aa59e6689 | 243,584,128,759,755,200,000,000,000,000,000,000,000 | 27 | [FIX] pritive key seed . |
static u8 hwme_set_request_sync(
u8 hw_attribute,
u8 hw_attribute_length,
u8 *hw_attribute_value,
void *device_ref
)
{
struct mac_message command, response;
command.command_id = SPI_HWME_SET_REQUEST;
command.length = 2 + hw_attribute_length;
command.pdata.hwme_set_req.hw_att... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 6402939ec86eaf226c8b8ae00ed983936b164908 | 51,198,892,789,438,330,000,000,000,000,000,000,000 | 32 | ieee802154: ca8210: prevent memory leak
In ca8210_probe the allocated pdata needs to be assigned to
spi_device->dev.platform_data before calling ca8210_get_platform_data.
Othrwise when ca8210_get_platform_data fails pdata cannot be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lor... |
static php_mb_regex_t *php_mbregex_compile_pattern(const char *pattern, int patlen, OnigOptionType options, OnigEncoding enc, OnigSyntaxType *syntax TSRMLS_DC)
{
int err_code = 0;
int found = 0;
php_mb_regex_t *retval = NULL, **rc = NULL;
OnigErrorInfo err_info;
OnigUChar err_str[ONIG_MAX_ERROR_MESSAGE_LEN];
fou... | 1 | [
"CWE-415"
] | php-src | 5b597a2e5b28e2d5a52fc1be13f425f08f47cb62 | 105,873,262,993,228,650,000,000,000,000,000,000,000 | 23 | Fix bug #72402: _php_mb_regex_ereg_replace_exec - double free |
static int StreamTcpPacketIsKeepAliveACK(TcpSession *ssn, Packet *p)
{
TcpStream *stream = NULL, *ostream = NULL;
uint32_t seq;
uint32_t ack;
uint32_t pkt_win;
if (p->flags & PKT_PSEUDO_STREAM_END)
return 0;
/* should get a normal ACK to a Keep Alive */
if (p->payload_len > 0)
... | 0 | [] | suricata | 50e2b973eeec7172991bf8f544ab06fb782b97df | 4,125,363,076,525,318,000,000,000,000,000,000,000 | 43 | stream/tcp: handle RST with MD5 or AO header
Special handling for RST packets if they have an TCP MD5 or AO header option.
The options hash can't be validated. The end host might be able to validate
it, as it can have a key/password that was communicated out of band.
The sender could use this to move the TCP state to... |
static inline bool io_alloc_req_refill(struct io_ring_ctx *ctx)
{
if (unlikely(!ctx->submit_state.free_list.next))
return __io_alloc_req_refill(ctx);
return true;
} | 0 | [
"CWE-416"
] | linux | e677edbcabee849bfdd43f1602bccbecf736a646 | 208,277,570,948,255,700,000,000,000,000,000,000,000 | 6 | io_uring: fix race between timeout flush and removal
io_flush_timeouts() assumes the timeout isn't in progress of triggering
or being removed/canceled, so it unconditionally removes it from the
timeout list and attempts to cancel it.
Leave it on the list and let the normal timeout cancelation take care
of it.
Cc: st... |
_PUBLIC_ NTSTATUS nbt_name_reply_send(struct nbt_name_socket *nbtsock,
struct socket_address *dest,
struct nbt_name_packet *request)
{
struct nbt_name_request *req;
enum ndr_err_code ndr_err;
req = talloc_zero(nbtsock, struct nbt_name_request);
NT_STATUS_HAVE_NO_MEMORY(req);
req->nbtsock = nbts... | 0 | [
"CWE-834"
] | samba | 3cc0f1eeda5f133532dda31eef9fc1b394127e50 | 12,188,487,656,818,385,000,000,000,000,000,000,000 | 40 | CVE-2020-14303: s4 nbt: fix busy loop on empty UDP packet
An empty UDP packet put the nbt server into a busy loop that consumes
100% of a cpu.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14417
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild... |
void CLASS aRGB_coeff(double aRGB_cam[3][3])
{
static const double rgb_aRGB[3][3] =
{{1.39828313770000, -0.3982830047, 9.64980900741708E-8},
{6.09219200572997E-8, 0.9999999809, 1.33230799934103E-8},
{2.17237099975343E-8, -0.0429383201, 1.04293828050000}};
double cmatrix_tmp [3][3] =
{{0.0, 0.0, 0.0},... | 0 | [
"CWE-400"
] | LibRaw | e67a9862d10ebaa97712f532eca1eb5e2e410a22 | 49,092,220,448,951,900,000,000,000,000,000,000,000 | 21 | Fixed Secunia Advisory SA86384
- possible infinite loop in unpacked_load_raw()
- possible infinite loop in parse_rollei()
- possible infinite loop in parse_sinar_ia()
Credits: Laurent Delosieres, Secunia Research at Flexera |
template<typename t>
CImg<T> operator<<(const CImg<t>& img) const {
return (+*this)<<=img; | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 127,120,233,060,193,520,000,000,000,000,000,000,000 | 3 | Fix other issues in 'CImg<T>::load_bmp()'. |
asmlinkage void do_notify_resume(struct pt_regs *regs, unsigned long thread_info_flags)
{
if (thread_info_flags & _TIF_SIGPENDING)
do_signal(regs, 0);
if (thread_info_flags & _TIF_NOTIFY_RESUME) {
clear_thread_flag(TIF_NOTIFY_RESUME);
tracehook_notify_resume(regs);
}
} | 1 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 31,344,274,762,486,098,000,000,000,000,000,000,000 | 10 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
Status InferenceContext::AttachContext(const Status& status) {
std::vector<string> input_shapes;
input_shapes.reserve(inputs_.size());
for (const ShapeHandle& input_shape : inputs_) {
input_shapes.emplace_back(DebugString(input_shape));
}
// Add information about the input tensors and partial tensor shap... | 0 | [
"CWE-190"
] | tensorflow | acd56b8bcb72b163c834ae4f18469047b001fadf | 333,390,377,120,899,320,000,000,000,000,000,000,000 | 45 | Fix security vulnerability with SpaceToBatchNDOp.
PiperOrigin-RevId: 445527615 |
void nft_unregister_obj(struct nft_object_type *obj_type)
{
nfnl_lock(NFNL_SUBSYS_NFTABLES);
list_del_rcu(&obj_type->list);
nfnl_unlock(NFNL_SUBSYS_NFTABLES);
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 37,846,576,920,306,980,000,000,000,000,000,000,000 | 6 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
static int get_client_master_key(SSL *s)
{
int is_export, i, n, keya;
unsigned int num_encrypted_key_bytes, key_length;
unsigned long len;
unsigned char *p;
const SSL_CIPHER *cp;
const EVP_CIPHER *c;
const EVP_MD *md;
unsigned char rand_premaster_secret[SSL_MAX_MASTER_KEY_LENGTH];
un... | 1 | [
"CWE-310"
] | openssl | 4040a7fd104b412bd446338c6c28a62eb7d8e852 | 207,239,124,152,590,500,000,000,000,000,000,000,000 | 186 | Better SSLv2 cipher-suite enforcement
Based on patch by: Nimrod Aviram <nimrod.aviram@gmail.com>
CVE-2015-3197
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org> |
bool InstanceKlass::remove_osr_nmethod(nmethod* n) {
// This is a short non-blocking critical region, so the no safepoint check is ok.
MutexLocker ml(CompiledMethod_lock->owned_by_self() ? NULL : CompiledMethod_lock
, Mutex::_no_safepoint_check_flag);
assert(n->is_osr_method(), "wrong kind of nme... | 0 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 220,697,773,670,734,840,000,000,000,000,000,000,000 | 42 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
xfs_filemap_page_mkwrite(
struct vm_area_struct *vma,
struct vm_fault *vmf)
{
struct inode *inode = file_inode(vma->vm_file);
int ret;
trace_xfs_filemap_page_mkwrite(XFS_I(inode));
sb_start_pagefault(inode->i_sb);
file_update_time(vma->vm_file);
xfs_ilock(XFS_I(inode), XFS_MMAPLOCK_SHARED);
if (IS_DAX(i... | 0 | [
"CWE-19"
] | linux | fc0561cefc04e7803c0f6501ca4f310a502f65b8 | 247,005,442,950,497,970,000,000,000,000,000,000,000 | 26 | xfs: optimise away log forces on timestamp updates for fdatasync
xfs: timestamp updates cause excessive fdatasync log traffic
Sage Weil reported that a ceph test workload was writing to the
log on every fdatasync during an overwrite workload. Event tracing
showed that the only metadata modification being made was the... |
dwg_write_file (const char *restrict filename, const Dwg_Data *restrict dwg)
{
FILE *fh;
struct stat attrib;
Bit_Chain dat = { 0 };
int error;
loglevel = dwg->opts & DWG_OPTS_LOGLEVEL;
assert (filename);
assert (dwg);
dat.opts = dwg->opts;
dat.version = (Dwg_Version_Type)dwg->header.version;
dat.fr... | 0 | [
"CWE-787"
] | libredwg | ecf5183d8b3b286afe2a30021353b7116e0208dd | 314,333,127,472,769,700,000,000,000,000,000,000,000 | 78 | dwg_section_wtype: fix fuzzing overflow
with illegal and overlong section names. Fixes GH #349, #352
section names cannot be longer than 24 |
static int kvm_vm_ioctl_create_vcpu(struct kvm *kvm, u32 id)
{
int r;
struct kvm_vcpu *vcpu;
struct page *page;
if (id >= KVM_MAX_VCPU_ID)
return -EINVAL;
mutex_lock(&kvm->lock);
if (kvm->created_vcpus == KVM_MAX_VCPUS) {
mutex_unlock(&kvm->lock);
return -EINVAL;
}
kvm->created_vcpus++;
mutex_unlock(&... | 0 | [
"CWE-401"
] | linux | f65886606c2d3b562716de030706dfe1bea4ed5e | 27,911,807,078,656,705,000,000,000,000,000,000,000 | 86 | KVM: fix memory leak in kvm_io_bus_unregister_dev()
when kmalloc() fails in kvm_io_bus_unregister_dev(), before removing
the bus, we should iterate over all other devices linked to it and call
kvm_iodevice_destructor() for them
Fixes: 90db10434b16 ("KVM: kvm_io_bus_unregister_dev() should never fail")
Cc: stable@vger... |
static void intr_callback(struct urb *urb)
{
rtl8150_t *dev;
__u8 *d;
int status = urb->status;
int res;
dev = urb->context;
if (!dev)
return;
switch (status) {
case 0: /* success */
break;
case -ECONNRESET: /* unlink */
case -ENOENT:
case -ESHUTDOWN:
return;
/* -EPIPE: should clear the halt */
d... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 7926aff5c57b577ab0f43364ff0c59d968f6a414 | 74,256,818,735,917,220,000,000,000,000,000,000,000 | 56 | rtl8150: Use heap buffers for all register access
Allocating USB buffers on the stack is not portable, and no longer
works on x86_64 (with VMAP_STACK enabled as per default).
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net... |
void CLASS quicktake_100_load_raw()
{
uchar pixel[484][644];
static const short gstep[16] =
{ -89,-60,-44,-32,-22,-15,-8,-2,2,8,15,22,32,44,60,89 };
static const short rstep[6][4] =
{ { -3,-1,1,3 }, { -5,-1,1,5 }, { -8,-2,2,8 },
{ -13,-3,3,13 }, { -19,-4,4,19 }, { -28,-6,6,28 } };
static const sho... | 0 | [
"CWE-369",
"CWE-704"
] | LibRaw | 9f26ce37f5be86ea11bfc6831366558650b1f6ff | 162,381,064,159,272,780,000,000,000,000,000,000,000 | 88 | SA81000: LibRaw 0.18.8 |
static int ip6mr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb)
{
struct net *net = sock_net(skb->sk);
struct mr6_table *mrt;
struct mfc6_cache *mfc;
unsigned int t = 0, s_t;
unsigned int h = 0, s_h;
unsigned int e = 0, s_e;
s_t = cb->args[0];
s_h = cb->args[1];
s_e = cb->args[2];
read_lock... | 0 | [
"CWE-20"
] | linux | 99253eb750fda6a644d5188fb26c43bad8d5a745 | 2,968,042,983,764,489,500,000,000,000,000,000,000 | 64 | ipv6: check sk sk_type and protocol early in ip_mroute_set/getsockopt
Commit 5e1859fbcc3c ("ipv4: ipmr: various fixes and cleanups") fixed
the issue for ipv4 ipmr:
ip_mroute_setsockopt() & ip_mroute_getsockopt() should not
access/set raw_sk(sk)->ipmr_table before making sure the socket
is a raw socket, and prot... |
static bool tr_valid(struct kvm_vcpu *vcpu)
{
struct kvm_segment tr;
vmx_get_segment(vcpu, &tr, VCPU_SREG_TR);
if (tr.unusable)
return false;
if (tr.selector & SELECTOR_TI_MASK) /* TI = 1 */
return false;
if (tr.type != 3 && tr.type != 11) /* TODO: Check if guest is in IA32e mode */
return false;
if (!tr.... | 0 | [
"CWE-20"
] | linux-2.6 | 16175a796d061833aacfbd9672235f2d2725df65 | 33,096,818,074,330,280,000,000,000,000,000,000,000 | 17 | KVM: VMX: Don't allow uninhibited access to EFER on i386
vmx_set_msr() does not allow i386 guests to touch EFER, but they can still
do so through the default: label in the switch. If they set EFER_LME, they
can oops the host.
Fix by having EFER access through the normal channel (which will check for
EFER_LME) even o... |
get_lisp_indent(void)
{
pos_T *pos, realpos, paren;
int amount;
char_u *that;
colnr_T col;
colnr_T firsttry;
int parencount, quotecount;
int vi_lisp;
// Set vi_lisp to use the vi-compatible method
vi_lisp = (vim_strchr(p_cpo, CPO_LISP) != NULL);
realpos = curwin->w_cursor;
... | 1 | [
"CWE-125"
] | vim | 8eba2bd291b347e3008aa9e565652d51ad638cfa | 229,569,421,335,584,000,000,000,000,000,000,000,000 | 183 | patch 8.2.5151: reading beyond the end of the line with lisp indenting
Problem: Reading beyond the end of the line with lisp indenting.
Solution: Avoid going over the NUL at the end of the line. |
libxlDomainDefNamespaceFormatXML(virBuffer *buf,
void *nsdata)
{
libxlDomainXmlNsDef *cmd = nsdata;
size_t i;
if (!cmd->num_args)
return 0;
virBufferAddLit(buf, "<xen:commandline>\n");
virBufferAdjustIndent(buf, 2);
for (i = 0; i < cmd->num_args; i++)
... | 0 | [
"CWE-667"
] | libvirt | 23b51d7b8ec885e97a9277cf0a6c2833db4636e8 | 145,728,496,465,393,250,000,000,000,000,000,000,000 | 21 | libxl: Disable death events after receiving a shutdown event
The libxl driver will handle all domain destruction and cleanup
when receiving a domain shutdown event from libxl. Commit fa30ee04a2a
introduced the ignoreDeathEvent boolean in the DomainObjPrivate struct
to ignore subsequent death events from libxl. But lib... |
MODRET auth_acct(cmd_rec *cmd) {
pr_response_add(R_502, _("ACCT command not implemented"));
return PR_HANDLED(cmd);
} | 0 | [
"CWE-59",
"CWE-61"
] | proftpd | ecff21e0d0e84f35c299ef91d7fda088e516d4ed | 270,702,165,924,328,200,000,000,000,000,000,000,000 | 4 | Backporting recursive handling of DefaultRoot path, when AllowChrootSymlinks
is off, to 1.3.5 branch. |
daemon_AuthUserPwd(char *username, char *password, char *errbuf)
{
#ifdef _WIN32
/*
* Warning: the user which launches the process must have the
* SE_TCB_NAME right.
* This corresponds to have the "Act as part of the Operating System"
* turned on (administrative tools, local security settings, local
* polici... | 1 | [
"CWE-345",
"CWE-787"
] | libpcap | 484d60cbf7ca4ec758c3cbb8a82d68b244a78d58 | 11,789,507,210,408,584,000,000,000,000,000,000,000 | 129 | On UN*X, don't tell the client why authentication failed.
"no such user" tells the client that the user ID isn't valid and,
therefore, that it needn't bother trying to do password cracking for
that user ID; just saying that the authentication failed dosn't give
them that hint.
This resolves the third problem in Inclu... |
date_s_test_nth_kday(VALUE klass)
{
if (!test_nth_kday(MIN_JD, MIN_JD + 366, GREGORIAN))
return Qfalse;
if (!test_nth_kday(2305814, 2598007, GREGORIAN))
return Qfalse;
if (!test_nth_kday(MAX_JD - 366, MAX_JD, GREGORIAN))
return Qfalse;
if (!test_nth_kday(MIN_JD, MIN_JD + 366, ITALY))
return Qfalse;... | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 252,544,700,157,003,970,000,000,000,000,000,000,000 | 18 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
void png_write(adv_fz* f, unsigned pix_width, unsigned pix_height, unsigned pix_pixel, unsigned char* pix_ptr, unsigned pix_scanline, unsigned char* pal_ptr, unsigned pal_size, unsigned char* rns_ptr, unsigned rns_size, shrink_t level)
{
unsigned char ihdr[13];
data_ptr z_ptr;
unsigned z_size;
if (adv_png_write_si... | 0 | [
"CWE-125"
] | advancecomp | 7894a6e684ce68ddff9f4f4919ab8e3911ac8040 | 7,270,574,246,817,625,000,000,000,000,000,000,000 | 52 | Fix a buffer overflow caused by invalid chunks |
TEST_F(RouterTest, UpstreamPerTryTimeoutDelayedPoolReady) {
NiceMock<Http::MockRequestEncoder> encoder;
Http::ResponseDecoder* response_decoder = nullptr;
Http::ConnectionPool::Callbacks* pool_callbacks;
EXPECT_CALL(cm_.thread_local_cluster_.conn_pool_, newStream(_, _))
.WillOnce(Invoke(
[&](Htt... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 99,334,293,290,739,320,000,000,000,000,000,000,000 | 54 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
const GF_FilterRegister *isoffin_register(GF_FilterSession *session)
{
#ifdef GPAC_DISABLE_ISOM
return NULL;
#else
return &ISOFFInRegister;
#endif /*GPAC_DISABLE_ISOM*/
} | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 61,606,837,640,537,305,000,000,000,000,000,000,000 | 8 | fixed crashes for very long path - cf #1908 |
static spl_filesystem_object *spl_filesystem_object_create_info(spl_filesystem_object *source, char *file_path, size_t file_path_len, int use_copy, zend_class_entry *ce, zval *return_value) /* {{{ */
{
spl_filesystem_object *intern;
zval arg1;
zend_error_handling error_handling;
if (!file_path || !file_path_len) {... | 0 | [
"CWE-74"
] | php-src | a5a15965da23c8e97657278fc8dfbf1dfb20c016 | 126,185,942,510,529,380,000,000,000,000,000,000,000 | 42 | Fix #78863: DirectoryIterator class silently truncates after a null byte
Since the constructor of DirectoryIterator and friends is supposed to
accepts paths (i.e. strings without NUL bytes), we must not accept
arbitrary strings. |
void nntp_clear_cache(struct NntpServer *nserv)
{
char file[PATH_MAX];
char *fp = NULL;
struct dirent *entry = NULL;
DIR *dp = NULL;
if (!nserv || !nserv->cacheable)
return;
cache_expand(file, sizeof(file), &nserv->conn->account, NULL);
dp = opendir(file);
if (dp)
{
mutt_str_strncat(file, si... | 0 | [
"CWE-119",
"CWE-787"
] | neomutt | 6296f7153f0c9d5e5cd3aaf08f9731e56621bdd3 | 64,048,694,631,681,030,000,000,000,000,000,000,000 | 64 | Set length modifiers for group and desc
nntp_add_group parses a line controlled by the connected nntp server.
Restrict the maximum lengths read into the stack buffers group, and
desc. |
static int fastrpc_invoke_send(struct fastrpc_session_ctx *sctx,
struct fastrpc_invoke_ctx *ctx,
u32 kernel, uint32_t handle)
{
struct fastrpc_channel_ctx *cctx;
struct fastrpc_user *fl = ctx->fl;
struct fastrpc_msg *msg = &ctx->msg;
cctx = fl->cctx;
msg->pid = fl->tgid;
msg->tid = current->p... | 0 | [
"CWE-400",
"CWE-401"
] | linux | fc739a058d99c9297ef6bfd923b809d85855b9a9 | 96,372,243,319,791,070,000,000,000,000,000,000,000 | 24 | misc: fastrpc: prevent memory leak in fastrpc_dma_buf_attach
In fastrpc_dma_buf_attach if dma_get_sgtable fails the allocated memory
for a should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Link: https://lore.kernel.org/r/20190925152742.16258-1-navid.emamdoost@gmail.com
Signed-off-by: Greg... |
void MainWindow::showStatusMessage(QAction* action, int timeoutSeconds)
{
// This object takes ownership of the passed action.
// This version does not currently log its message.
m_statusBarAction.reset(action);
action->setParent(0);
m_player->setStatusLabel(action->text(), timeoutSeconds, action);
... | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 240,245,831,102,478,140,000,000,000,000,000,000,000 | 8 | fix upgrade check is not using TLS correctly |
set_table_entry(struct ctl_table *entry,
const char *procname, void *data, int maxlen,
umode_t mode, proc_handler *proc_handler,
bool load_idx)
{
entry->procname = procname;
entry->data = data;
entry->maxlen = maxlen;
entry->mode = mode;
entry->proc_handler = proc_handler;
if (load_idx) {
entry->extra1 =... | 0 | [
"CWE-200"
] | linux | 4efbc454ba68def5ef285b26ebfcfdb605b52755 | 57,816,747,639,095,630,000,000,000,000,000,000,000 | 16 | sched: Fix information leak in sys_sched_getattr()
We're copying the on-stack structure to userspace, but forgot to give
the right number of bytes to copy. This allows the calling process to
obtain up to PAGE_SIZE bytes from the stack (and possibly adjacent
kernel memory).
This fix copies only as much as we actually ... |
bool MainWindow::on_actionSave_triggered()
{
if (m_currentFile.isEmpty()) {
return on_actionSave_As_triggered();
} else {
if (Util::warnIfNotWritable(m_currentFile, this, tr("Save XML")))
return false;
bool success = saveXML(m_currentFile);
QMutexLocker locker(&m_auto... | 0 | [
"CWE-89",
"CWE-327",
"CWE-295"
] | shotcut | f008adc039642307f6ee3378d378cdb842e52c1d | 40,463,177,459,166,250,000,000,000,000,000,000,000 | 21 | fix upgrade check is not using TLS correctly |
_XimEncodePreeditValue(
Xic ic,
XIMResourceList res,
XIMArg *p)
{
if (res->xrm_name == XrmStringToQuark(XNStdColormap)) {
XStandardColormap *colormap_ret;
int count;
if (!(XGetRGBColormaps(ic->core.im->core.display,
ic->core.focus_window, &colormap_ret,
&count, (Atom)p->value)))
... | 0 | [
"CWE-190"
] | libx11 | 1703b9f3435079d3c6021e1ee2ec34fd4978103d | 231,978,820,289,292,830,000,000,000,000,000,000,000 | 49 | Change the data_len parameter of _XimAttributeToValue() to CARD16
It's coming from a length in the protocol (unsigned) and passed
to functions that expect unsigned int parameters (_XCopyToArg()
and memcpy()).
Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
Reviewed-by: Todd Carson <toc@daybefore.net> |
static void exec_runtime_freep(ExecRuntime **rt) {
(void) exec_runtime_free(*rt, false);
} | 0 | [
"CWE-269"
] | systemd | f69567cbe26d09eac9d387c0be0fc32c65a83ada | 93,376,288,607,793,720,000,000,000,000,000,000,000 | 3 | core: expose SUID/SGID restriction as new unit setting RestrictSUIDSGID= |
static bool too_many_pipe_buffers_soft(unsigned long user_bufs)
{
unsigned long soft_limit = READ_ONCE(pipe_user_pages_soft);
return soft_limit && user_bufs > soft_limit;
} | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 335,785,391,873,954,580,000,000,000,000,000,000,000 | 6 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
specific_send_sig_info(int sig, struct siginfo *info, struct task_struct *t)
{
return send_signal(sig, info, t, 0);
} | 0 | [] | linux-2.6 | 0083fc2c50e6c5127c2802ad323adf8143ab7856 | 64,431,699,485,096,230,000,000,000,000,000,000,000 | 4 | do_sigaltstack: avoid copying 'stack_t' as a structure to user space
Ulrich Drepper correctly points out that there is generally padding in
the structure on 64-bit hosts, and that copying the structure from
kernel to user space can leak information from the kernel stack in those
padding bytes.
Avoid the whole issue b... |
test_bson_append_binary_deprecated (void)
{
const static uint8_t binary[] = {'1', '2', '3', '4'};
bson_t *b;
bson_t *b2;
b = bson_new ();
BSON_ASSERT (bson_append_binary (
b, "binary", -1, BSON_SUBTYPE_BINARY_DEPRECATED, binary, 4));
b2 = get_bson ("binary_deprecated.bson");
BSON_ASSERT_BSON... | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 119,203,783,295,432,780,000,000,000,000,000,000,000 | 14 | CDRIVER-2269 Check for zero string length in codewscope |
void Field_varstring::sort_string(uchar *to,uint length)
{
uint tot_length= length_bytes == 1 ? (uint) *ptr : uint2korr(ptr);
if (field_charset == &my_charset_bin)
{
/* Store length last in high-byte order to sort longer strings first */
if (length_bytes == 1)
to[length-1]= tot_length;
else
... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 248,853,193,647,663,870,000,000,000,000,000,000,000 | 23 | 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... |
match_at(regex_t* reg, const UChar* str, const UChar* end,
#ifdef USE_MATCH_RANGE_MUST_BE_INSIDE_OF_SPECIFIED_RANGE
const UChar* right_range,
#endif
const UChar* sstart, UChar* sprev, OnigMatchArg* msa)
{
static UChar FinishCode[] = { OP_FINISH };
int i, n, num_mem, best_len, pop_level;
LengthType tlen, tlen... | 0 | [
"CWE-125"
] | oniguruma | 690313a061f7a4fa614ec5cc8368b4f2284e059b | 105,899,548,961,307,260,000,000,000,000,000,000,000 | 1,488 | fix #57 : DATA_ENSURE() check must be before data access |
void ssl3_finish_mac(SSL *s, const unsigned char *buf, int len)
{
if (s->s3->handshake_buffer && !(s->s3->flags & TLS1_FLAGS_KEEP_HANDSHAKE))
{
BIO_write (s->s3->handshake_buffer,(void *)buf,len);
}
else
{
int i;
for (i=0;i< SSL_MAX_DIGEST;i++)
{
if (s->s3->handshake_dgst[i]!= NULL)
EVP_Dige... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 84,549,710,898,352,710,000,000,000,000,000,000,000 | 16 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
ZEND_API void zend_update_property(zend_class_entry *scope, zval *object, const char *name, int name_length, zval *value TSRMLS_DC) /* {{{ */
{
zval *property;
zend_class_entry *old_scope = EG(scope);
EG(scope) = scope;
if (!Z_OBJ_HT_P(object)->write_property) {
const char *class_name;
zend_uint class_name_le... | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 217,611,791,259,263,140,000,000,000,000,000,000,000 | 22 | Fix bug #73147: Use After Free in PHP7 unserialize() |
static int shadow_copy2_chown(vfs_handle_struct *handle, const char *fname,
uid_t uid, gid_t gid)
{
time_t timestamp;
char *stripped;
int ret, saved_errno;
char *conv;
if (!shadow_copy2_strip_snapshot(talloc_tos(), handle, fname,
×tamp, &stripped)) {
return -1;
}
if (timestamp == 0) {
re... | 0 | [
"CWE-200"
] | samba | 675fd8d771f9d43e354dba53ddd9b5483ae0a1d7 | 58,013,173,754,982,090,000,000,000,000,000,000,000 | 26 | CVE-2015-5299: s3-shadow-copy2: fix missing access check on snapdir
Fix originally from <partha@exablox.com>
https://bugzilla.samba.org/show_bug.cgi?id=11529
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org> |
format_flags(struct ds *ds, const char *(*bit_to_string)(uint32_t),
uint32_t flags, char del)
{
uint32_t bad = 0;
if (!flags) {
ds_put_char(ds, '0');
return;
}
while (flags) {
uint32_t bit = rightmost_1bit(flags);
const char *s;
s = bit_to_string(bi... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 80,405,947,093,619,150,000,000,000,000,000,000,000 | 28 | 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... |
has_undead_caller_from_outside_scc_p (struct cgraph_node *node,
void *data ATTRIBUTE_UNUSED)
{
struct cgraph_edge *cs;
for (cs = node->callers; cs; cs = cs->next_caller)
if (cs->caller->thunk.thunk_p
&& cs->caller->call_for_symbol_thunks_and_aliases
(has_undead_caller_from_outside_scc_p, NULL, tr... | 0 | [
"CWE-20"
] | gcc | a09ccc22459c565814f79f96586fe4ad083fe4eb | 7,470,714,774,776,726,000,000,000,000,000,000,000 | 15 | Avoid segfault when doing IPA-VRP but not IPA-CP (PR 93015)
2019-12-21 Martin Jambor <mjambor@suse.cz>
PR ipa/93015
* ipa-cp.c (ipcp_store_vr_results): Check that info exists
testsuite/
* gcc.dg/lto/pr93015_0.c: New test.
From-SVN: r279695 |
enum nss_status _nss_mymachines_getgrgid_r(
gid_t gid,
struct group *gr,
char *buffer, size_t buflen,
int *errnop) {
_cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_bus_message_unref_ sd_bus_message* reply = NULL;... | 0 | [
"CWE-415",
"CWE-119"
] | systemd | cb31827d62066a04b02111df3052949fda4b6888 | 43,013,556,263,135,120,000,000,000,000,000,000,000 | 73 | nss-mymachines: do not allow overlong machine names
https://github.com/systemd/systemd/issues/2002 |
void gf_filter_ask_rt_reschedule(GF_Filter *filter, u32 us_until_next)
{
if (!filter->in_process_callback) {
if (filter->session->direct_mode) return;
if (filter->session->in_final_flush) return;
//allow reschedule if not called from process
filter->schedule_next_time = 1+us_until_next + gf_sys_clock_high_res(... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 110,739,019,620,585,240,000,000,000,000,000,000,000 | 21 | fixed crashes for very long path - cf #1908 |
napi_status napi_create_external(napi_env env,
void* data,
napi_finalize finalize_cb,
void* finalize_hint,
napi_value* result) {
NAPI_PREAMBLE(env);
CHECK_ARG(env, result);
v8::Isol... | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 118,889,983,954,931,980,000,000,000,000,000,000,000 | 26 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
set_up_session_language (GdmSession *self)
{
char **environment;
int i;
const char *value;
environment = g_listenv ();
for (i = 0; environment[i] != NULL; i++) {
if (strcmp (environment[i], "LANG") != 0 &&
strcmp (environment[i], "LANGUAGE") !... | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 332,275,511,392,823,140,000,000,000,000,000,000,000 | 22 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
evdns_base_clear_host_addresses(struct evdns_base *base)
{
struct hosts_entry *victim;
EVDNS_LOCK(base);
while ((victim = TAILQ_FIRST(&base->hostsdb))) {
TAILQ_REMOVE(&base->hostsdb, victim, next);
mm_free(victim);
}
EVDNS_UNLOCK(base);
} | 0 | [
"CWE-125"
] | libevent | 96f64a022014a208105ead6c8a7066018449d86d | 260,296,949,609,394,250,000,000,000,000,000,000,000 | 10 | evdns: name_parse(): fix remote stack overread
@asn-the-goblin-slayer:
"the name_parse() function in libevent's DNS code is vulnerable to a buffer overread.
971 if (cp != name_out) {
972 if (cp + 1 >= end) return -1;
973 *cp++ = '.';
974 }
975 if (cp + ... |
UTI_FloatNetworkToHost(Float f)
{
int32_t exp, coef;
uint32_t x;
x = ntohl(f.f);
exp = x >> FLOAT_COEF_BITS;
if (exp >= 1 << (FLOAT_EXP_BITS - 1))
exp -= 1 << FLOAT_EXP_BITS;
exp -= FLOAT_COEF_BITS;
coef = x % (1U << FLOAT_COEF_BITS);
if (coef >= 1 << (FLOAT_COEF_BITS - 1))
coef -= 1 << F... | 0 | [
"CWE-59"
] | chrony | 7a4c396bba8f92a3ee8018620983529152050c74 | 219,677,157,637,227,550,000,000,000,000,000,000,000 | 18 | util: add functions for common file operations
Add a function to open a file for reading, writing, or appending.
In uppercase modes errors are handled as fatal, i.e. the caller doesn't
need to check for NULL. To avoid string manipulations in the callers,
the function accepts an optional directory and suffix. New files... |
string_interpret_escape(const uschar **pp)
{
#ifdef COMPILE_UTILITY
const uschar *hex_digits= CUS"0123456789abcdef";
#endif
int ch;
const uschar *p = *pp;
ch = *(++p);
if (isdigit(ch) && ch != '8' && ch != '9')
{
ch -= '0';
if (isdigit(p[1]) && p[1] != '8' && p[1] != '9')
{
ch = ch * 8 + *(++p) - '0';
... | 1 | [] | exim | 2600301ba6dbac5c9d640c87007a07ee6dcea1f4 | 174,877,650,622,848,900,000,000,000,000,000,000,000 | 40 | string.c: do not interpret '\\' before '\0' (CVE-2019-15846)
Add documents about CVE-2019-15846
Add testcase for CVE-2019-15846
Update Changelog
Add Announcements |
handle_allow(CMD_Request *rx_message, CMD_Reply *tx_message)
{
IPAddr ip;
int subnet_bits;
UTI_IPNetworkToHost(&rx_message->data.allow_deny.ip, &ip);
subnet_bits = ntohl(rx_message->data.allow_deny.subnet_bits);
if (NCR_AddAccessRestriction(&ip, subnet_bits, 1, 0)) {
tx_message->status = htons(STT_SUCCESS... | 0 | [
"CWE-189"
] | chrony | 7712455d9aa33d0db0945effaa07e900b85987b1 | 166,944,890,741,776,710,000,000,000,000,000,000,000 | 12 | Fix buffer overflow when processing crafted command packets
When the length of the REQ_SUBNETS_ACCESSED, REQ_CLIENT_ACCESSES
command requests and the RPY_SUBNETS_ACCESSED, RPY_CLIENT_ACCESSES,
RPY_CLIENT_ACCESSES_BY_INDEX, RPY_MANUAL_LIST command replies is
calculated, the number of items stored in the packet is not v... |
cleanup_exit(int i)
{
cleanup_socket();
_exit(i);
} | 0 | [
"CWE-399",
"CWE-415"
] | openssh-portable | e04fd6dde16de1cdc5a4d9946397ff60d96568db | 242,815,383,832,304,640,000,000,000,000,000,000,000 | 5 | upstream: factor SSH_AGENT_CONSTRAIN_EXTENSION parsing into its own
function and remove an unused variable; ok dtucker@
OpenBSD-Commit-ID: e1a938657fbf7ef0ba5e73b30365734a0cc96559 |
static int ethtool_get_wol(struct net_device *dev, char __user *useraddr)
{
struct ethtool_wolinfo wol = { ETHTOOL_GWOL };
if (!dev->ethtool_ops->get_wol)
return -EOPNOTSUPP;
dev->ethtool_ops->get_wol(dev, &wol);
if (copy_to_user(useraddr, &wol, sizeof(wol)))
return -EFAULT;
return 0;
} | 0 | [] | linux | e89e9cf539a28df7d0eb1d0a545368e9920b34ac | 131,825,394,979,769,190,000,000,000,000,000,000,000 | 13 | [IPv4/IPv6]: UFO Scatter-gather approach
Attached is kernel patch for UDP Fragmentation Offload (UFO) feature.
1. This patch incorporate the review comments by Jeff Garzik.
2. Renamed USO as UFO (UDP Fragmentation Offload)
3. udp sendfile support with UFO
This patches uses scatter-gather feature of skb to generate l... |
void agp_free_key(int key)
{
if (key < 0)
return;
if (key < MAXKEY)
clear_bit(key, agp_bridge->key_list);
} | 0 | [
"CWE-190"
] | linux-2.6 | 194b3da873fd334ef183806db751473512af29ce | 11,459,567,714,405,884,000,000,000,000,000,000,000 | 8 | agp: fix arbitrary kernel memory writes
pg_start is copied from userspace on AGPIOC_BIND and AGPIOC_UNBIND ioctl
cmds of agp_ioctl() and passed to agpioc_bind_wrap(). As said in the
comment, (pg_start + mem->page_count) may wrap in case of AGPIOC_BIND,
and it is not checked at all in case of AGPIOC_UNBIND. As a resu... |
static noinline int audit_inode_permission(struct inode *inode,
u32 perms, u32 audited, u32 denied,
int result,
unsigned flags)
{
struct common_audit_data ad;
struct inode_security_struct *isec = inode->i_security;
int rc;
ad.type = LSM_AUDIT_DATA_INODE;
ad.u.inode = inode;
rc = slow_avc... | 0 | [
"CWE-264"
] | linux | 7b0d0b40cd78cadb525df760ee4cac151533c2b5 | 236,759,557,892,102,800,000,000,000,000,000,000,000 | 18 | selinux: Permit bounded transitions under NO_NEW_PRIVS or NOSUID.
If the callee SID is bounded by the caller SID, then allowing
the transition to occur poses no risk of privilege escalation and we can
therefore safely allow the transition to occur. Add this exemption
for both the case where a transition was explicitl... |
Status explain(OperationContext* opCtx,
const OpMsgRequest& opMsgRequest,
ExplainOptions::Verbosity verbosity,
BSONObjBuilder* out) const override {
std::string dbname = opMsgRequest.getDatabase().toString();
const BSONObj& cmdObj = opMsgReque... | 1 | [
"CWE-20"
] | mongo | d315547544d7146b93a8e6e94cc4b88cd0d19c95 | 269,780,475,534,685,600,000,000,000,000,000,000,000 | 59 | SERVER-38275 ban explain with UUID |
static bool cmd_smart(IDEState *s, uint8_t cmd)
{
int n;
if (s->hcyl != 0xc2 || s->lcyl != 0x4f) {
goto abort_cmd;
}
if (!s->smart_enabled && s->feature != SMART_ENABLE) {
goto abort_cmd;
}
switch (s->feature) {
case SMART_DISABLE:
s->smart_enabled = 0;
ret... | 1 | [
"CWE-189"
] | qemu | 940973ae0b45c9b6817bab8e4cf4df99a9ef83d7 | 52,908,355,131,713,630,000,000,000,000,000,000,000 | 169 | 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... |
GF_Box *href_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_TextHyperTextBox, GF_ISOM_BOX_TYPE_HREF);
return (GF_Box *) tmp;
} | 0 | [
"CWE-476"
] | gpac | d527325a9b72218612455a534a508f9e1753f76e | 116,807,966,382,196,500,000,000,000,000,000,000,000 | 5 | fixed #1768 |
void sctp_endpoint_free(struct sctp_endpoint *ep)
{
ep->base.dead = 1;
ep->base.sk->sk_state = SCTP_SS_CLOSED;
/* Unlink this endpoint, so we can't find it again! */
sctp_unhash_endpoint(ep);
sctp_endpoint_put(ep);
} | 0 | [] | linux-2.6 | 5e739d1752aca4e8f3e794d431503bfca3162df4 | 196,527,692,641,039,440,000,000,000,000,000,000,000 | 11 | sctp: fix potential panics in the SCTP-AUTH API.
All of the SCTP-AUTH socket options could cause a panic
if the extension is disabled and the API is envoked.
Additionally, there were some additional assumptions that
certain pointers would always be valid which may not
always be the case.
This patch hardens the API a... |
static int coolkey_ecc_op(sc_card_t *card,
const u8 * data, size_t datalen,
u8 * out, size_t outlen)
{
int r;
const u8 *crypt_in;
u8 **crypt_out_p;
u8 ins = 0;
size_t crypt_in_len, *crypt_out_len_p;
coolkey_private_data_t * priv = COOLKEY_DATA(card);
coolkey_compute_ecc_params_t params;
size_t param... | 0 | [
"CWE-415"
] | OpenSC | c246f6f69a749d4f68626b40795a4f69168008f4 | 330,182,836,646,269,700,000,000,000,000,000,000,000 | 59 | coolkey: Make sure the object ID is unique when filling list
Thanks to oss-fuzz
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19208 |
GF_Err gf_filter_set_source(GF_Filter *filter, GF_Filter *link_from, const char *link_ext)
{
if (!filter || !link_from) return GF_BAD_PARAM;
if (filter == link_from) return GF_OK;
//don't allow loops
if (gf_filter_in_parent_chain(filter, link_from)) return GF_BAD_PARAM;
if (!link_from->id) {
gf_filter_assign_id... | 0 | [
"CWE-787"
] | gpac | da37ec8582266983d0ec4b7550ec907401ec441e | 23,948,563,767,397,660,000,000,000,000,000,000,000 | 28 | fixed crashes for very long path - cf #1908 |
QPDF::resolveObjectsInStream(int obj_stream_number)
{
// Force resolution of object stream
QPDFObjectHandle obj_stream = getObjectByID(obj_stream_number, 0);
if (! obj_stream.isStream())
{
throw QPDFExc(qpdf_e_damaged_pdf, this->m->file->getName(),
this->m->last_object_description,
this... | 1 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 41,689,417,830,436,650,000,000,000,000,000,000,000 | 102 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
gboolean
mono_verifier_is_class_full_trust (MonoClass *klass)
{
/* under CoreCLR code is trusted if it is part of the "platform" otherwise all code inside the GAC is trusted */
gboolean trusted_location = (mono_security_get_mode () != MONO_SECURITY_MODE_CORE_CLR) ?
(klass->image->assembly && klass->image->assembly... | 0 | [
"CWE-20"
] | mono | 65292a69c837b8a5f7a392d34db63de592153358 | 57,053,019,842,591,145,000,000,000,000,000,000,000 | 10 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
void Magick::Image::shave(const Geometry &geometry_)
{
MagickCore::Image
*newImage;
RectangleInfo
shaveInfo=geometry_;
GetPPException;
newImage=ShaveImage(constImage(),&shaveInfo,exceptionInfo);
replaceImage(newImage);
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 82,828,511,756,035,880,000,000,000,000,000,000,000 | 13 | Added missing return to avoid use after free. |
check_noaddress(TERMTYPE2 *tp, const char *why)
{
UNEXPECTED(column_address);
UNEXPECTED(cursor_address);
UNEXPECTED(cursor_home);
UNEXPECTED(cursor_mem_address);
UNEXPECTED(cursor_to_ll);
UNEXPECTED(row_address);
UNEXPECTED(row_address);
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 35,394,413,764,336,967,000,000,000,000,000,000,000 | 10 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
int GetNameHash(const byte* source, word32* idx, byte* hash,
int maxIdx)
{
int length; /* length of all distinguished names */
int ret;
word32 dummy;
byte tag;
WOLFSSL_ENTER("GetNameHash");
dummy = *idx;
if (GetASNTag(source, &dummy, &tag, maxIdx) == 0... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 129,272,404,979,902,360,000,000,000,000,000,000,000 | 34 | OCSP: improve handling of OCSP no check extension |
void kvm_bitmap_or_dest_vcpus(struct kvm *kvm, struct kvm_lapic_irq *irq,
unsigned long *vcpu_bitmap)
{
struct kvm_lapic **dest_vcpu = NULL;
struct kvm_lapic *src = NULL;
struct kvm_apic_map *map;
struct kvm_vcpu *vcpu;
unsigned long bitmap;
int i, vcpu_idx;
bool ret;
rcu_read_lock();
map = rcu_deref... | 0 | [
"CWE-703",
"CWE-459"
] | linux | f7d8a19f9a056a05c5c509fa65af472a322abfee | 335,427,853,059,168,550,000,000,000,000,000,000,000 | 37 | Revert "KVM: x86: Open code necessary bits of kvm_lapic_set_base() at vCPU RESET"
Revert a change to open code bits of kvm_lapic_set_base() when emulating
APIC RESET to fix an apic_hw_disabled underflow bug due to arch.apic_base
and apic_hw_disabled being unsyncrhonized when the APIC is created. If
kvm_arch_vcpu_crea... |
pci_populate_msicap(struct msicap *msicap, int msgnum, int nextptr)
{
int mmc;
/* Number of msi messages must be a power of 2 between 1 and 32 */
assert((msgnum & (msgnum - 1)) == 0 && msgnum >= 1 && msgnum <= 32);
mmc = ffs(msgnum) - 1;
bzero(msicap, sizeof(struct msicap));
msicap->capid = PCIY_MSI;
msicap->n... | 1 | [
"CWE-617",
"CWE-703"
] | acrn-hypervisor | 2b3dedfb9ba13f15887f22b935d373f36c9a59fa | 130,063,783,035,813,700,000,000,000,000,000,000,000 | 13 | dm: pci: clean up assert() in pci core
Tracked-On: #3252
Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com>
Reviewed-by: Yonghua Huang <yonghua.huang@intel.com> |
static void fuse_adjust_compat(struct fuse_conn *fc, struct fuse_args *args)
{
if (fc->minor < 4 && args->in.h.opcode == FUSE_STATFS)
args->out.args[0].size = FUSE_COMPAT_STATFS_SIZE;
if (fc->minor < 9) {
switch (args->in.h.opcode) {
case FUSE_LOOKUP:
case FUSE_CREATE:
case FUSE_MKNOD:
case FUSE_MKDIR:
... | 0 | [
"CWE-416"
] | linux | 15fab63e1e57be9fdb5eec1bbc5916e9825e9acb | 228,271,044,577,815,800,000,000,000,000,000,000,000 | 32 | fs: prevent page refcount overflow in pipe_buf_get
Change pipe_buf_get() to return a bool indicating whether it succeeded
in raising the refcount of the page (if the thing in the pipe is a page).
This removes another mechanism for overflowing the page refcount. All
callers converted to handle a failure.
Reported-by:... |
static void detach_mnt(struct mount *mnt, struct path *old_path)
{
old_path->dentry = mnt->mnt_mountpoint;
old_path->mnt = &mnt->mnt_parent->mnt;
mnt->mnt_parent = mnt;
mnt->mnt_mountpoint = mnt->mnt.mnt_root;
list_del_init(&mnt->mnt_child);
hlist_del_init_rcu(&mnt->mnt_hash);
hlist_del_init(&mnt->mnt_mp_list);
... | 0 | [
"CWE-703"
] | linux | cd4a40174b71acd021877341684d8bb1dc8ea4ae | 308,489,483,845,641,980,000,000,000,000,000,000,000 | 12 | mnt: Fail collect_mounts when applied to unmounted mounts
The only users of collect_mounts are in audit_tree.c
In audit_trim_trees and audit_add_tree_rule the path passed into
collect_mounts is generated from kern_path passed an audit_tree
pathname which is guaranteed to be an absolute path. In those cases
collect_... |
gs_grab_grab_offscreen (GSGrab *grab,
gboolean hide_cursor)
{
GdkScreen *screen;
gboolean res;
gs_debug ("Grabbing an offscreen window");
screen = gtk_invisible_get_screen (GTK_INVISIBLE (grab->priv->invisible));
res = gs_grab_grab_window (grab, grab->... | 0 | [] | gnome-screensaver | f93a22c175090cf02e80bc3ee676b53f1251f685 | 33,563,045,803,075,830,000,000,000,000,000,000,000 | 13 | Nullify grab window variables when windows are destroyed
If we don't do this then there is a time period where the
grab window variables contain dangling pointers which can
cause crashes.
Part of fix for
https://bugzilla.gnome.org/show_bug.cgi?id=609789 |
static int do_remount(struct path *path, int flags, int mnt_flags,
void *data)
{
int err;
struct super_block *sb = path->mnt->mnt_sb;
struct mount *mnt = real_mount(path->mnt);
if (!check_mnt(mnt))
return -EINVAL;
if (path->dentry != path->mnt->mnt_root)
return -EINVAL;
err = security_sb_remount(sb... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 3151527ee007b73a0ebd296010f1c0454a919c7d | 327,784,808,832,323,900,000,000,000,000,000,000,000 | 38 | userns: Don't allow creation if the user is chrooted
Guarantee that the policy of which files may be access that is
established by setting the root directory will not be violated
by user namespaces by verifying that the root directory points
to the root of the mount namespace at the time of user namespace
creation.
... |
static u8 vmx_msr_bitmap_mode(struct kvm_vcpu *vcpu)
{
u8 mode = 0;
if (cpu_has_secondary_exec_ctrls() &&
(secondary_exec_controls_get(to_vmx(vcpu)) &
SECONDARY_EXEC_VIRTUALIZE_X2APIC_MODE)) {
mode |= MSR_BITMAP_MODE_X2APIC;
if (enable_apicv && kvm_vcpu_apicv_active(vcpu))
mode |= MSR_BITMAP_MODE_X... | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 139,621,728,162,042,650,000,000,000,000,000,000,000 | 14 | 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... |
ia64_load_extra (struct task_struct *task)
{
#ifdef CONFIG_PERFMON
unsigned long info;
#endif
if ((task->thread.flags & IA64_THREAD_DBG_VALID) != 0)
ia64_load_debug_regs(&task->thread.dbr[0]);
#ifdef CONFIG_PERFMON
if ((task->thread.flags & IA64_THREAD_PM_VALID) != 0)
pfm_load_regs(task);
info = __get_cpu_va... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 184,927,123,837,496,770,000,000,000,000,000,000,000 | 23 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
inline void Ceil(const RuntimeShape& input_shape, const float* input_data,
const RuntimeShape& output_shape, float* output_data) {
ruy::profiler::ScopeLabel label("Ceil");
auto input_map = MapAsVector(input_data, input_shape);
auto output_map = MapAsVector(output_data, output_shape);
output_map... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 338,895,664,159,622,770,000,000,000,000,000,000,000 | 7 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
static u8 dccp_feat_sp_list_ok(u8 feat_num, u8 const *sp_list, u8 sp_len)
{
if (sp_list == NULL || sp_len < 1)
return 0;
while (sp_len--)
if (!dccp_feat_is_valid_sp_val(feat_num, *sp_list++))
return 0;
return 1;
} | 0 | [
"CWE-401"
] | linux | 1d3ff0950e2b40dc861b1739029649d03f591820 | 58,398,646,571,540,090,000,000,000,000,000,000,000 | 9 | dccp: Fix memleak in __feat_register_sp
If dccp_feat_push_change fails, we forget free the mem
which is alloced by kmemdup in dccp_feat_clone_sp_val.
Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: e8ef967a54f4 ("dccp: Registration routines for changing feature values")
Reviewed-by: Mukesh Ojha <mojha@codeaurora.o... |
AcpiNsExecModuleCodeList (
void)
{
ACPI_OPERAND_OBJECT *Prev;
ACPI_OPERAND_OBJECT *Next;
ACPI_EVALUATE_INFO *Info;
UINT32 MethodCount = 0;
ACPI_FUNCTION_TRACE (NsExecModuleCodeList);
/* Exit now if the list is empty */
Next = AcpiGbl_ModuleCodeList;
... | 0 | [
"CWE-200"
] | acpica | 37f2c716f2c6ab14c3ba557a539c3ee3224931b5 | 114,609,085,107,535,820,000,000,000,000,000,000,000 | 54 | acpi: acpica: fix acpi operand cache leak in nseval.c
I found an ACPI cache leak in ACPI early termination and boot continuing case.
When early termination occurs due to malicious ACPI table, Linux kernel
terminates ACPI function and continues to boot process. While kernel terminates
ACPI function, kmem_cache_destroy... |
g_file_real_replace_finish (GFile *file,
GAsyncResult *res,
GError **error)
{
g_return_val_if_fail (g_task_is_valid (res, file), NULL);
return g_task_propagate_pointer (G_TASK (res), error);
} | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 266,527,330,693,348,200,000,000,000,000,000,000,000 | 8 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
static void warn_32bit_meta_chunk(struct btrfs_fs_info *fs_info,
u64 logical, u64 length, u64 type)
{
if (!(type & BTRFS_BLOCK_GROUP_METADATA))
return;
if (logical + length < BTRFS_32BIT_EARLY_WARN_THRESHOLD)
return;
btrfs_warn_32bit_limit(fs_info);
} | 0 | [
"CWE-476",
"CWE-703"
] | linux | e4571b8c5e9ffa1e85c0c671995bd4dcc5c75091 | 294,306,537,806,063,050,000,000,000,000,000,000,000 | 11 | btrfs: fix NULL pointer dereference when deleting device by invalid id
[BUG]
It's easy to trigger NULL pointer dereference, just by removing a
non-existing device id:
# mkfs.btrfs -f -m single -d single /dev/test/scratch1 \
/dev/test/scratch2
# mount /dev/test/scratch1 /mnt/btrfs
# btrfs device remove 3 /... |
void dump_state(const TIFFSTATE *state){
TRACE(("State: Location %u size %d eof %d data: %p ifd: %d\n", (uint)state->loc,
(int)state->size, (uint)state->eof, state->data, state->ifd));
} | 0 | [
"CWE-190",
"CWE-787"
] | Pillow | 4e2def2539ec13e53a82e06c4b3daf00454100c4 | 272,615,940,536,447,270,000,000,000,000,000,000,000 | 4 | Overflow checks for realloc for tiff decoding |
create_backup (char const *to, struct stat *to_st, int *to_errno,
bool leave_original, bool remember_backup)
{
struct stat tmp_st;
int tmp_errno;
/* When the input to patch modifies the same file more than once, patch only
backs up the initial version of each file.
To figure out which files ha... | 0 | [
"CWE-22"
] | patch | 685a78b6052f4df6eac6d625a545cfb54a6ac0e1 | 301,091,663,361,456,470,000,000,000,000,000,000,000 | 146 | Do not let a malicious patch create files above current directory
This addresses CVE-2010-4651, reported by Jakub Wilk.
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2010-4651
* src/util.c (strip_leading_slashes): Reject absolute file names
and file names containing a component of "..".
* tests/bad-filenames: New fi... |
int wmi_ps_dev_profile_cfg(struct wil6210_priv *wil,
enum wmi_ps_profile_type ps_profile)
{
int rc;
struct wmi_ps_dev_profile_cfg_cmd cmd = {
.ps_profile = ps_profile,
};
struct {
struct wmi_cmd_hdr wmi;
struct wmi_ps_dev_profile_cfg_event evt;
} __packed reply;
u32 status;
wil_dbg_wmi(wil, "Setting... | 0 | [
"CWE-119"
] | linux | b5a8ffcae4103a9d823ea3aa3a761f65779fbe2a | 294,860,860,736,156,000,000,000,000,000,000,000,000 | 33 | wil6210: missing length check in wmi_set_ie
Add a length check in wmi_set_ie to detect unsigned integer
overflow.
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> |
TEST(EqOp, MatchesReferencedArrayValue) {
BSONObj operand = BSON("a.0" << 5);
EqualityMatchExpression eq("a.0", operand["a.0"]);
ASSERT(eq.matchesBSON(BSON("a" << BSON_ARRAY(5)), NULL));
ASSERT(!eq.matchesBSON(BSON("a" << BSON_ARRAY(BSON_ARRAY(5))), NULL));
} | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 98,398,432,688,180,260,000,000,000,000,000,000,000 | 6 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
static __init int smack_init(void)
{
struct cred *cred;
if (!security_module_enable(&smack_ops))
return 0;
printk(KERN_INFO "Smack: Initializing.\n");
/*
* Set the security state for the initial task.
*/
cred = (struct cred *) current->cred;
cred->security = &smack_known_floor.smk_known;
/* initilize ... | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 110,899,124,453,283,880,000,000,000,000,000,000,000 | 34 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
R_API void r_bin_java_print_bootstrap_method_summary(RBinJavaBootStrapMethod *bsm) {
RBinJavaBootStrapArgument *bsm_arg = NULL;
RListIter *iter = NULL, *iter_tmp = NULL;
if (bsm == NULL) {
eprintf ("Attempting to print an invalid RBinJavaBootStrapArgument *.\n");
return;
}
eprintf ("Bootstrap Method Informatio... | 0 | [
"CWE-125"
] | radare2 | e9ce0d64faf19fa4e9c260250fbdf25e3c11e152 | 182,326,602,641,851,530,000,000,000,000,000,000,000 | 21 | Fix #10498 - Fix crash in fuzzed java files (#10511) |
virDomainIOThreadIDDefArrayInit(virDomainDefPtr def,
unsigned int iothreads)
{
size_t i;
ssize_t nxt = -1;
virDomainIOThreadIDDefPtr iothrid = NULL;
g_autoptr(virBitmap) thrmap = NULL;
/* Same value (either 0 or some number), then we have none to fill in or
* th... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 65,645,430,744,485,140,000,000,000,000,000,000,000 | 46 | conf: Don't format http cookies unless VIR_DOMAIN_DEF_FORMAT_SECURE is used
Starting with 3b076391befc3fe72deb0c244ac6c2b4c100b410
(v6.1.0-122-g3b076391be) we support http cookies. Since they may contain
somewhat sensitive information we should not format them into the XML
unless VIR_DOMAIN_DEF_FORMAT_SECURE is assert... |
unsigned int length, gfp_t gfp_mask);
static inline struct sk_buff *napi_alloc_skb(struct napi_struct *napi,
unsigned int length)
{
return __napi_alloc_skb(napi, length, GFP_ATOMIC); | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 331,641,243,524,764,930,000,000,000,000,000,000,000 | 5 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
*/
bool skb_gso_validate_mtu(const struct sk_buff *skb, unsigned int mtu)
{
const struct skb_shared_info *shinfo = skb_shinfo(skb);
const struct sk_buff *iter;
unsigned int hlen;
hlen = skb_gso_network_seglen(skb);
if (shinfo->gso_size != GSO_BY_FRAGS)
return hlen <= mtu;
/* Undo this so we can re-use heade... | 1 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 190,092,583,463,472,720,000,000,000,000,000,000,000 | 21 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
gf_dynstrcat(&ds->rep->dasher_ctx->mux_pids, szMuxPID, NULL);
}
}
}
static GF_DashStream *dasher_get_stream(GF_DasherCtx *ctx, const char *src_url, u32 original_pid, u32 pid_id)
{
u32 i, count = gf_list_count(ctx->pids); | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 184,164,267,631,622,830,000,000,000,000,000,000,000 | 10 | fixed #2138 |
static SECURITY_STATUS nla_initialize_security_context(rdpNla* nla, BOOL initial,
SecBufferDesc* pInputBufferDesc,
SecBufferDesc* pOutputBufferDesc)
{
SECURITY_STATUS status;
PCtxtHandle ctx = NULL;
if (!nl... | 0 | [] | FreeRDP | 479e891545473f01c187daffdfa05fc752b54b72 | 219,253,035,315,937,370,000,000,000,000,000,000,000 | 46 | check return values for SetCredentialsAttributes, throw warnings for unsupported attributes |
snprint_hexstring(char *buf, size_t buf_len, const u_char * cp, size_t len)
{
size_t out_len = 0;
if (sprint_realloc_hexstring((u_char **) & buf, &buf_len, &out_len, 0,
cp, len))
return (int) out_len;
else
return -1;
} | 0 | [
"CWE-59",
"CWE-61"
] | net-snmp | 4fd9a450444a434a993bc72f7c3486ccce41f602 | 33,261,557,902,731,260,000,000,000,000,000,000,000 | 9 | CHANGES: snmpd: Stop reading and writing the mib_indexes/* files
Caching directory contents is something the operating system should do
and is not something Net-SNMP should do. Instead of storing a copy of
the directory contents in ${tmp_dir}/mib_indexes/${n}, always scan a
MIB directory. |
xfs_da3_join(
struct xfs_da_state *state)
{
struct xfs_da_state_blk *drop_blk;
struct xfs_da_state_blk *save_blk;
int action = 0;
int error;
trace_xfs_da_join(state->args);
drop_blk = &state->path.blk[ state->path.active-1 ];
save_blk = &state->altpath.blk[ state->path.active-1 ];
ASSERT(state->path.blk[... | 0 | [
"CWE-399"
] | linux | c88547a8119e3b581318ab65e9b72f27f23e641d | 105,425,116,048,597,230,000,000,000,000,000,000,000 | 81 | xfs: fix directory hash ordering bug
Commit f5ea1100 ("xfs: add CRCs to dir2/da node blocks") introduced
in 3.10 incorrectly converted the btree hash index array pointer in
xfs_da3_fixhashpath(). It resulted in the the current hash always
being compared against the first entry in the btree rather than the
current bloc... |
START_TEST (test_recv_sonmp)
{
char pkt1[] = {
0x01, 0x00, 0x81, 0x00, 0x01, 0x00, 0x00, 0x1b,
0x25, 0x08, 0x50, 0x47, 0x00, 0x13, 0xaa, 0xaa,
0x03, 0x00, 0x00, 0x81, 0x01, 0xa2, 0xac, 0x10,
0x65, 0xa8, 0x00, 0x02, 0x08, 0x38, 0x0c, 0x02,
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x... | 0 | [] | lldpd | 73d42680fce8598324364dbb31b9bc3b8320adf7 | 235,427,162,261,810,450,000,000,000,000,000,000,000 | 66 | sonmp: fix heap overflow when reading SONMP packets
By sending short SONMP packets, an attacker can make the decoder crash
by reading too much data on the heap. SONMP packets are fixed in size,
just ensure we get the enough bytes to contain a SONMP packet.
CVE-2021-43612 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.