func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static ippp_bundle *isdn_ppp_mp_bundle_alloc(void)
{
int i;
for (i = 0; i < ISDN_MAX_CHANNELS; i++)
if (isdn_ppp_bundle_arr[i].ref_ct <= 0)
return (isdn_ppp_bundle_arr + i);
return NULL;
} | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 278,842,254,074,260,280,000,000,000,000,000,000,000 | 8 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
static struct tcf_chain *tcf_chain_create(struct tcf_block *block,
u32 chain_index)
{
struct tcf_chain *chain;
ASSERT_BLOCK_LOCKED(block);
chain = kzalloc(sizeof(*chain), GFP_KERNEL);
if (!chain)
return NULL;
list_add_tail_rcu(&chain->list, &block->chain_list);
mutex_init(&chain->filter_chain_lock);
c... | 0 | [
"CWE-416"
] | linux | 04c2a47ffb13c29778e2a14e414ad4cb5a5db4b5 | 183,465,225,642,569,100,000,000,000,000,000,000,000 | 19 | net: sched: fix use-after-free in tc_new_tfilter()
Whenever tc_new_tfilter() jumps back to replay: label,
we need to make sure @q and @chain local variables are cleared again,
or risk use-after-free as in [1]
For consistency, apply the same fix in tc_ctl_chain()
BUG: KASAN: use-after-free in mini_qdisc_pair_swap+0x1... |
void SSL_set_tmp_dh_callback(SSL *ssl, DH *(*dh) (SSL *ssl, int is_export,
int keylength))
{
SSL_callback_ctrl(ssl, SSL_CTRL_SET_TMP_DH_CB, (void (*)(void))dh);
} | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 206,190,980,420,851,300,000,000,000,000,000,000,000 | 5 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
unsigned char *lpPrev(unsigned char *lp, unsigned char *p) {
if (p-lp == LP_HDR_SIZE) return NULL;
p--; /* Seek the first backlen byte of the last element. */
uint64_t prevlen = lpDecodeBacklen(p);
prevlen += lpEncodeBacklen(NULL,prevlen);
return p-prevlen+1; /* Seek the first byte of the previous e... | 0 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 187,290,567,552,118,240,000,000,000,000,000,000,000 | 7 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
StringVal EncryptionFunctions::sm4_decrypt(FunctionContext* ctx, const StringVal& src,
const StringVal& key, const StringVal& iv,
const StringVal& mode) {
EncryptionMode encryption_mode = SM4_128_ECB;
if (mode.len != 0 && !mod... | 0 | [
"CWE-200"
] | incubator-doris | 246ac4e37aa4da6836b7850cb990f02d1c3725a3 | 77,864,806,004,627,090,000,000,000,000,000,000,000 | 13 | [fix] fix a bug of encryption function with iv may return wrong result (#8277) |
int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e)
{
ptrdiff_t n = (ptrdiff_t)(e - t->table); /* CAW: fixed to be 64bit nice, still need the crazy negative case... */
/* CAW: this is bad, really bad, maybe stack goes other direction on this machine... */
if(n < 0) { return -2; }
if(t->table[n].k ==... | 0 | [
"CWE-119",
"CWE-310"
] | json-c | 64e36901a0614bf64a19bc3396469c66dcd0b015 | 149,077,850,089,907,770,000,000,000,000,000,000,000 | 27 | Patch to address the following issues:
* CVE-2013-6371: hash collision denial of service
* CVE-2013-6370: buffer overflow if size_t is larger than int |
static int parse_eops(extop **result, bool critical, int elem)
{
extop *eop = NULL, *prev = NULL;
extop **tail = result;
int sign;
int i = tokval.t_type;
int oper_num = 0;
bool do_subexpr = false;
*tail = NULL;
/* End of string is obvious; ) ends a sub-expression list e.g. DUP */
f... | 1 | [
"CWE-416"
] | nasm | 6ac6ac57e3d01ea8ed4ea47706eb724b59176461 | 222,526,921,441,294,500,000,000,000,000,000,000,000 | 217 | parser: when flattening an eop, must preserve any data buffer
An eop may have a data buffer associated with it as part of the same
memory allocation. Therefore, we need to move "subexpr" up instead of
merging it into "eop".
This *partially* resolves BR 3392707, but that test case still
triggers a violation when using... |
static void send_ascii_command(const char *buf) {
off_t offset = 0;
const char* ptr = buf;
size_t len = strlen(buf);
do {
ssize_t nw = write(sock, ptr + offset, len - offset);
if (nw == -1) {
if (errno != EINTR) {
fprintf(stderr, "Failed to write: %s\n", stre... | 0 | [
"CWE-20"
] | memcached | 75cc83685e103bc8ba380a57468c8f04413033f9 | 43,425,112,192,480,380,000,000,000,000,000,000,000 | 17 | Issue 102: Piping null to the server will crash it |
mrb_class_name_class(mrb_state *mrb, struct RClass *outer, struct RClass *c, mrb_sym id)
{
mrb_value name;
mrb_sym nsym = MRB_SYM(__classname__);
if (mrb_obj_iv_defined(mrb, (struct RObject*)c, nsym)) return;
if (outer == NULL || outer == mrb->object_class) {
name = mrb_symbol_value(id);
}
else {
n... | 0 | [
"CWE-787"
] | mruby | b1d0296a937fe278239bdfac840a3fd0e93b3ee9 | 92,852,647,193,364,250,000,000,000,000,000,000,000 | 28 | class.c: clear method cache after `remove_method`. |
void ContentSettingsObserver::DidBlockContentType(
ContentSettingsType settings_type) {
DidBlockContentType(settings_type, base::string16());
} | 0 | [
"CWE-20",
"CWE-200"
] | muon | c18663aa171c6cdf03da3e8c70df8663645b97c4 | 330,970,933,392,061,160,000,000,000,000,000,000,000 | 4 | Issue: 15232 AllowScript should use atom::ContentSettingsManager like other Allow* methods in the observer |
static int add_bound_rdev(struct md_rdev *rdev)
{
struct mddev *mddev = rdev->mddev;
int err = 0;
if (!mddev->pers->hot_remove_disk) {
/* If there is hot_add_disk but no hot_remove_disk
* then added disks for geometry changes,
* and should be added immediately.
*/
super_types[mddev->major_version].
... | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 113,156,638,222,508,080,000,000,000,000,000,000,000 | 29 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
static int sqfs_read_entry(struct squashfs_directory_entry **dest, void *src)
{
struct squashfs_directory_entry *tmp;
u16 sz;
tmp = src;
sz = get_unaligned_le16(src + sizeof(*tmp) - sizeof(u16));
/*
* 'src' points to the begin of a directory entry, and 'sz' gets its
* 'name_size' member's value. name_size is ... | 0 | [
"CWE-787"
] | u-boot | 2ac0baab4aff1a0b45067d0b62f00c15f4e86856 | 275,167,882,672,845,100,000,000,000,000,000,000,000 | 22 | fs/squashfs: sqfs_read: Prevent arbitrary code execution
Following Jincheng's report, an out-of-band write leading to arbitrary
code execution is possible because on one side the squashfs logic
accepts directory names up to 65535 bytes (u16), while U-Boot fs logic
accepts directory names up to 255 bytes long.
Prevent... |
static int hci_sock_getname(struct socket *sock, struct sockaddr *addr,
int *addr_len, int peer)
{
struct sockaddr_hci *haddr = (struct sockaddr_hci *) addr;
struct sock *sk = sock->sk;
struct hci_dev *hdev = hci_pi(sk)->hdev;
BT_DBG("sock %p sk %p", sock, sk);
if (!hdev)
return -EBADFD;
lock_sock(sk)... | 1 | [
"CWE-200"
] | linux | 3f68ba07b1da811bf383b4b701b129bfcb2e4988 | 26,528,807,811,681,670,000,000,000,000,000,000,000 | 21 | Bluetooth: HCI - Fix info leak via getsockname()
The HCI code fails to initialize the hci_channel member of struct
sockaddr_hci and that for leaks two bytes kernel stack via the
getsockname() syscall. Initialize hci_channel with 0 to avoid the
info leak.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Marc... |
AP_DECLARE_NONSTD(int) ap_rprintf(request_rec *r, const char *fmt, ...)
{
va_list va;
int n;
if (r->connection->aborted)
return -1;
va_start(va, fmt);
n = ap_vrprintf(r, fmt, va);
va_end(va);
return n;
} | 0 | [
"CWE-703"
] | httpd | be0f5335e3e73eb63253b050fdc23f252f5c8ae3 | 83,952,450,252,107,470,000,000,000,000,000,000,000 | 14 | *) SECURITY: CVE-2015-0253 (cve.mitre.org)
core: Fix a crash introduced in with ErrorDocument 400 pointing
to a local URL-path with the INCLUDES filter active, introduced
in 2.4.11. PR 57531. [Yann Ylavic]
Submitted By: ylavic
Committed By: covener
git-svn-id: https://svn.apache.org/repos/asf/http... |
size_t umm_free_heap_size( void ) {
/*
* To calculate free heap size, we take a number of free blocks
* `umm_stat.free_blocks_cnt` and multiply it by the size of the block.
*
* We also take into account the allocation overhead: next/prev indexes pair
* (`umm_ptr`) per allocation.
*/
return ((size_... | 0 | [
"CWE-190"
] | mongoose-os | b338266c0492cccdb8d8a93ee0b9217bc5a04036 | 151,161,875,825,118,700,000,000,000,000,000,000,000 | 11 | Fix umm_malloc() |
void t_go_generator::generate_serialize_set_element(ofstream& out, t_set* tset, string prefix) {
t_field efield(tset->get_elem_type(), "");
efield.set_req(t_field::T_OPT_IN_REQ_OUT);
generate_serialize_field(out, &efield, prefix);
} | 0 | [
"CWE-77"
] | thrift | 2007783e874d524a46b818598a45078448ecc53e | 51,264,589,623,495,940,000,000,000,000,000,000,000 | 5 | THRIFT-3893 Command injection in format_go_output
Client: Go
Patch: Jens Geyer |
static void cil_reset_userattr(struct cil_userattribute *attr)
{
struct cil_list_item *expr = NULL;
struct cil_list_item *next = NULL;
/* during a re-resolve, we need to reset the lists of expression stacks associated with this attribute from a userattribute statement */
if (attr->expr_list != NULL) {
/* we don'... | 0 | [
"CWE-416"
] | selinux | f34d3d30c8325e4847a6b696fe7a3936a8a361f3 | 1,459,652,136,357,057,000,000,000,000,000,000,000 | 20 | libsepol/cil: Destroy classperms list when resetting classpermission
Nicolas Iooss reports:
A few months ago, OSS-Fuzz found a crash in the CIL compiler, which
got reported as
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title
is misleading, or is caused by another issue that conflicts with... |
static void ForwardTab()
{
int x = curr->w_x;
if (x == cols) {
LineFeed(1);
x = 0;
}
if (curr->w_tabs[x] && x < cols - 1)
x++;
while (x < cols - 1 && !curr->w_tabs[x])
x++;
curr->w_x = x;
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
} | 0 | [
"CWE-119"
] | screen | c336a32a1dcd445e6b83827f83531d4c6414e2cd | 212,471,110,218,763,730,000,000,000,000,000,000,000 | 15 | Fix stack overflow due to too deep recursion
Bug: 45713
How to reproduce:
Run this command inside screen
$ printf '\x1b[10000000T'
screen will recursively call MScrollV to depth n/256. This is time consuming and will overflow stack if n is huge. |
static void parser_free(struct jv_parser* p) {
parser_reset(p);
jv_free(p->path);
jv_free(p->output);
jv_mem_free(p->stack);
jv_mem_free(p->tokenbuf);
jvp_dtoa_context_free(&p->dtoa);
} | 0 | [
"CWE-119",
"CWE-787"
] | jq | 8eb1367ca44e772963e704a700ef72ae2e12babd | 146,888,798,954,782,250,000,000,000,000,000,000,000 | 8 | Heap buffer overflow in tokenadd() (fix #105)
This was an off-by one: the NUL terminator byte was not allocated on
resize. This was triggered by JSON-encoded numbers longer than 256
bytes. |
TPML_TAGGED_PCR_PROPERTY_Unmarshal(TPML_TAGGED_PCR_PROPERTY *target, BYTE **buffer, INT32 *size)
{
TPM_RC rc = TPM_RC_SUCCESS;
UINT32 i;
if (rc == TPM_RC_SUCCESS) {
rc = UINT32_Unmarshal(&target->count, buffer, size);
}
if (rc == TPM_RC_SUCCESS) {
if (target->count > MAX_PCR_PROPERTIES) {
rc... | 1 | [
"CWE-787"
] | libtpms | f16250b35aff6995e540143a9858c9cf0d1f9573 | 206,818,040,315,480,430,000,000,000,000,000,000,000 | 18 | tpm2: Reset TPM2B buffer sizes after test fails for valid buffer size
Reset the buffer size indicator in a TPM2B type of buffer after it failed
the test for the maximum buffer size it allows. This prevents having bad
buffer sizes in memory that can come to haunt us when writing the volatile
state for example.
Signed-... |
static u32 gasp_version(__be32 *p)
{
return be32_to_cpu(p[1]) & 0xffffff;
} | 0 | [
"CWE-119",
"CWE-284",
"CWE-787"
] | linux | 667121ace9dbafb368618dbabcf07901c962ddac | 184,155,891,920,632,670,000,000,000,000,000,000,000 | 4 | firewire: net: guard against rx buffer overflows
The IP-over-1394 driver firewire-net lacked input validation when
handling incoming fragmented datagrams. A maliciously formed fragment
with a respectively large datagram_offset would cause a memcpy past the
datagram buffer.
So, drop any packets carrying a fragment wi... |
static void xen_cpuid(unsigned int *ax, unsigned int *bx,
unsigned int *cx, unsigned int *dx)
{
unsigned maskebx = ~0;
/*
* Mask out inconvenient features, to try and disable as many
* unsupported kernel subsystems as possible.
*/
switch (*ax) {
case CPUID_MWAIT_LEAF:
/* Synthesize the values.. */
... | 0 | [
"CWE-703"
] | linux | 96e8fc5818686d4a1591bb6907e7fdb64ef29884 | 87,594,650,506,315,680,000,000,000,000,000,000,000 | 33 | x86/xen: Use clear_bss() for Xen PV guests
Instead of clearing the bss area in assembly code, use the clear_bss()
function.
This requires to pass the start_info address as parameter to
xen_start_kernel() in order to avoid the xen_start_info being zeroed
again.
Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-of... |
void operator()(const Range& range) const CV_OVERRIDE
{
CV_INSTRUMENT_REGION();
Ptr<FeatureEvaluator> evaluator = classifier->featureEvaluator->clone();
double gypWeight = 0.;
Size origWinSize = classifier->data.origWinSize;
for( int scaleIdx = 0; scaleIdx < nscales; sc... | 0 | [
"CWE-125"
] | opencv | 321c74ccd6077bdea1d47450ca4fe955cb5b6330 | 111,787,515,676,251,200,000,000,000,000,000,000,000 | 54 | objdetect: validate feature rectangle on reading |
InsecureRandomDataProvider::provideRandomData(unsigned char* data, size_t len)
{
for (size_t i = 0; i < len; ++i)
{
data[i] = static_cast<unsigned char>((this->random() & 0xff0) >> 4);
}
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 92,182,795,015,947,900,000,000,000,000,000,000,000 | 7 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static void usage(char *progName)
{
int i;
printf("USAGE: %s\n", progName);
printf(" <Inputfile (BMP|PPM)> <Quality> [options]\n\n");
printf(" %s\n", progName);
printf(" <Inputfile (JPG)> [options]\n\n");
printf("Options:\n\n");
printf("-alloc = Dynamically allocate JPEG image buffers\n... | 0 | [
"CWE-787"
] | libjpeg-turbo | 2a9e3bd7430cfda1bc812d139e0609c6aca0b884 | 304,527,973,203,295,120,000,000,000,000,000,000,000 | 69 | TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:
- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
integer overflow when computing the retur... |
int set_netnsid_from_name(const char *name, int nsid)
{
struct {
struct nlmsghdr n;
struct rtgenmsg g;
char buf[1024];
} req = {
.n.nlmsg_len = NLMSG_LENGTH(sizeof(struct rtgenmsg)),
.n.nlmsg_flags = NLM_F_REQUEST,
.n.nlmsg_type = RTM_NEWNSID,
.g.rtgen_family = AF_UNSPEC,
};
int fd, err = 0... | 0 | [
"CWE-416"
] | iproute2 | 9bf2c538a0eb10d66e2365a655bf6c52f5ba3d10 | 305,148,995,769,932,500,000,000,000,000,000,000,000 | 28 | ipnetns: use-after-free problem in get_netnsid_from_name func
Follow the following steps:
# ip netns add net1
# export MALLOC_MMAP_THRESHOLD_=0
# ip netns list
then Segmentation fault (core dumped) will occur.
In get_netnsid_from_name func, answer is freed before
rta_getattr_u32(tb[NETNSA_NSID]), where tb[] refers... |
static int perf_default_core_config(const char *var __used, const char *value __used)
{
/* Add other config variables here and to Documentation/config.txt. */
return 0;
} | 0 | [
"CWE-94"
] | linux | aba8d056078e47350d85b06a9cabd5afcc4b72ea | 236,557,408,745,342,150,000,000,000,000,000,000,000 | 5 | perf tools: do not look at ./config for configuration
In addition to /etc/perfconfig and $HOME/.perfconfig, perf looks for
configuration in the file ./config, imitating git which looks at
$GIT_DIR/config. If ./config is not a perf configuration file, it
fails, or worse, treats it as a configuration file and changes b... |
void __fput_sync(struct file *file)
{
if (atomic_long_dec_and_test(&file->f_count)) {
struct task_struct *task = current;
BUG_ON(!(task->flags & PF_KTHREAD));
__fput(file);
}
} | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 80,798,512,562,284,540,000,000,000,000,000,000,000 | 8 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static int i40e_setup_tc_cls_flower(struct i40e_netdev_priv *np,
struct flow_cls_offload *cls_flower)
{
struct i40e_vsi *vsi = np->vsi;
switch (cls_flower->command) {
case FLOW_CLS_REPLACE:
return i40e_configure_clsflower(vsi, cls_flower);
case FLOW_CLS_DESTROY:
return i40e_delete_clsflower(vsi, cls_fl... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 193,574,776,046,189,470,000,000,000,000,000,000,000 | 16 | 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> |
int __sys_connect(int fd, struct sockaddr __user *uservaddr, int addrlen)
{
int ret = -EBADF;
struct fd f;
f = fdget(fd);
if (f.file) {
ret = __sys_connect_file(f.file, uservaddr, addrlen, 0);
if (f.flags)
fput(f.file);
}
return ret;
} | 0 | [] | linux | d69e07793f891524c6bbf1e75b9ae69db4450953 | 339,098,063,336,715,600,000,000,000,000,000,000,000 | 14 | net: disallow ancillary data for __sys_{send,recv}msg_file()
Only io_uring uses (and added) these, and we want to disallow the
use of sendmsg/recvmsg for anything but regular data transfers.
Use the newly added prep helper to split the msghdr copy out from
the core function, to check for msg_control and msg_controllen... |
static int ZEND_FASTCALL ZEND_IS_SMALLER_OR_EQUAL_SPEC_CV_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
zval *result = &EX_T(opline->result.u.var).tmp_var;
compare_function(result,
_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
_get_zval_ptr_tmp(&opl... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 252,129,384,958,512,960,000,000,000,000,000,000,000 | 14 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
static int cma_addr_cmp(struct sockaddr *src, struct sockaddr *dst)
{
if (src->sa_family != dst->sa_family)
return -1;
switch (src->sa_family) {
case AF_INET:
return ((struct sockaddr_in *) src)->sin_addr.s_addr !=
((struct sockaddr_in *) dst)->sin_addr.s_addr;
case AF_INET6:
return ipv6_addr_cmp(&(... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 63,504,192,911,115,395,000,000,000,000,000,000,000 | 17 | IB/core: Don't resolve passive side RoCE L2 address in CMA REQ handler
The code that resolves the passive side source MAC within the rdma_cm
connection request handler was both redundant and buggy, so remove it.
It was redundant since later, when an RC QP is modified to RTR state,
the resolution will take place in th... |
static int ZEND_FASTCALL ZEND_FE_RESET_SPEC_TMP_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op1;
zval *array_ptr, **array_ptr_ptr;
HashTable *fe_ht;
zend_object_iterator *iter = NULL;
zend_class_entry *ce = NULL;
zend_bool is_empty = 0;
if (opline->extended_value & ZEND... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 103,956,064,464,181,840,000,000,000,000,000,000,000 | 156 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
check_compat_entry_size_and_hooks(struct compat_arpt_entry *e,
struct xt_table_info *newinfo,
unsigned int *size,
const unsigned char *base,
const unsigned char *limit,
const unsigned int *hook_entries,
const unsigned int *underflows,
const char *name)
{
struct xt_entry_target... | 1 | [
"CWE-119",
"CWE-787"
] | linux | 6e94e0cfb0887e4013b3b930fa6ab1fe6bb6ba91 | 299,887,262,738,695,020,000,000,000,000,000,000,000 | 71 | netfilter: x_tables: make sure e->next_offset covers remaining blob size
Otherwise this function may read data beyond the ruleset blob.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> |
static RFlagsAtOffset* r_flag_get_nearest_list(RFlag *f, ut64 off, int dir) {
RFlagsAtOffset *flags = NULL;
RFlagsAtOffset key;
key.off = off;
if (dir >= 0) {
flags = r_skiplist_get_geq (f->by_off, &key);
} else {
flags = r_skiplist_get_leq (f->by_off, &key);
}
if (dir == 0 && flags && flags->off != off) {
... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | 52b1526443c1f433087928291d1c3d37a5600515 | 10,031,225,272,860,294,000,000,000,000,000,000,000 | 14 | Fix crash in wasm disassembler |
uint STDCALL mysql_errno(MYSQL *mysql)
{
return mysql ? mysql->net.last_errno : 0;
} | 0 | [] | mariadb-connector-c | 27b2f3d1f1550dfaee0f63a331a406ab31c1b37e | 81,843,944,158,751,590,000,000,000,000,000,000,000 | 4 | various checks for corrupted packets in the protocol
also: check the return value of unpack_fields() |
void incrbyfloatCommand(client *c) {
long double incr, value;
robj *o, *new, *aux1, *aux2;
o = lookupKeyWrite(c->db,c->argv[1]);
if (o != NULL && checkType(c,o,OBJ_STRING)) return;
if (getLongDoubleFromObjectOrReply(c,o,&value,NULL) != C_OK ||
getLongDoubleFromObjectOrReply(c,c->argv[2],&in... | 0 | [
"CWE-190"
] | redis | 394614a5f91d88380f480c4610926a865b5b0f16 | 218,144,283,687,344,650,000,000,000,000,000,000,000 | 36 | Fix integer overflow in STRALGO LCS (CVE-2021-29477)
An integer overflow bug in Redis version 6.0 or newer could be exploited using
the STRALGO LCS command to corrupt the heap and potentially result with remote
code execution.
(cherry picked from commit f0c5f920d0f88bd8aa376a2c05af4902789d1ef9) |
void qmp_guest_shutdown(bool has_mode, const char *mode, Error **errp)
{
Error *local_err = NULL;
UINT shutdown_flag = EWX_FORCE;
slog("guest-shutdown called, mode: %s", mode);
if (!has_mode || strcmp(mode, "powerdown") == 0) {
shutdown_flag |= EWX_POWEROFF;
} else if (strcmp(mode, "halt")... | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 34,407,306,089,189,310,000,000,000,000,000,000,000 | 32 | qga: check bytes count read by guest-file-read
While reading file content via 'guest-file-read' command,
'qmp_guest_file_read' routine allocates buffer of count+1
bytes. It could overflow for large values of 'count'.
Add check to avoid it.
Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com>
Signed-off-by: Pra... |
void
invalidate_cached_quoted_dollar_at ()
{
dispose_words (cached_quoted_dollar_at);
cached_quoted_dollar_at = 0; | 0 | [
"CWE-20"
] | bash | 4f747edc625815f449048579f6e65869914dd715 | 312,415,570,559,937,550,000,000,000,000,000,000,000 | 5 | Bash-4.4 patch 7 |
static void test_bug1500()
{
MYSQL_STMT *stmt;
MYSQL_BIND my_bind[3];
int rc;
int32 int_data[3]= {2, 3, 4};
const char *data;
myheader("test_bug1500");
rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_bg1500");
myquery(rc);
rc= mysql_query(mysql, "CREATE TABLE test_bg1500 (i INT)");
myque... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 112,406,705,049,883,780,000,000,000,000,000,000,000 | 109 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an)
{
struct ath_atx_tid *tid;
struct ath_atx_ac *ac;
struct ath_txq *txq;
int tidno;
for (tidno = 0, tid = &an->tid[tidno];
tidno < IEEE80211_NUM_TIDS; tidno++, tid++) {
ac = tid->ac;
txq = ac->txq;
ath_txq_lock(sc, txq);
ac->clear_ps... | 0 | [
"CWE-362",
"CWE-241"
] | linux | 21f8aaee0c62708654988ce092838aa7df4d25d8 | 235,420,139,761,200,700,000,000,000,000,000,000 | 24 | ath9k: protect tid->sched check
We check tid->sched without a lock taken on ath_tx_aggr_sleep(). That
is race condition which can result of doing list_del(&tid->list) twice
(second time with poisoned list node) and cause crash like shown below:
[424271.637220] BUG: unable to handle kernel paging request at 00100104
[... |
MonClient::MonClient(CephContext *cct_) :
Dispatcher(cct_),
AuthServer(cct_),
messenger(NULL),
monc_lock("MonClient::monc_lock"),
timer(cct_, monc_lock),
finisher(cct_),
initialized(false),
log_client(NULL),
more_log_pending(false),
want_monmap(true),
had_a_connection(false),
reopen_interval_mul... | 0 | [
"CWE-294"
] | ceph | 2927fd91d41e505237cc73f9700e5c6a63e5cb4f | 87,238,165,231,876,730,000,000,000,000,000,000,000 | 17 | mon/MonClient: bring back CEPHX_V2 authorizer challenges
Commit c58c5754dfd2 ("msg/async/ProtocolV1: use AuthServer and
AuthClient") introduced a backwards compatibility issue into msgr1.
To fix it, commit 321548010578 ("mon/MonClient: skip CEPHX_V2
challenge if client doesn't support it") set out to skip authorizer
c... |
format_SET_IPV4_SRC(const struct ofpact_ipv4 *a, struct ds *s)
{
ds_put_format(s, "%smod_nw_src:%s"IP_FMT,
colors.param, colors.end, IP_ARGS(a->ipv4));
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 3,362,254,429,704,055,600,000,000,000,000,000,000 | 5 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static void encode_compound_hdr(struct xdr_stream *xdr,
struct rpc_rqst *req,
struct compound_hdr *hdr)
{
__be32 *p;
/* initialize running count of expected bytes in reply.
* NOTE: the replied tag SHOULD be the same is the one sent,
* but this is not required as a MUST for the server to do so. */
hdr->r... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 272,775,528,875,884,400,000,000,000,000,000,000,000 | 18 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
int dsClose(void) {
return REDIS_OK;
} | 0 | [
"CWE-20"
] | redis | 697af434fbeb2e3ba2ba9687cd283ed1a2734fa5 | 331,374,094,469,157,100,000,000,000,000,000,000,000 | 3 | initial changes needed to turn the current VM code into a cache system. Tons of work to do still. |
xmlSubstituteEntitiesDefault(int val) {
int old = xmlSubstituteEntitiesDefaultValue;
xmlSubstituteEntitiesDefaultValue = val;
return(old);
} | 0 | [
"CWE-119"
] | libxml2 | 23f05e0c33987d6605387b300c4be5da2120a7ab | 296,047,754,278,131,900,000,000,000,000,000,000,000 | 6 | Detect excessive entities expansion upon replacement
If entities expansion in the XML parser is asked for,
it is possble to craft relatively small input document leading
to excessive on-the-fly content generation.
This patch accounts for those replacement and stop parsing
after a given threshold. it can be bypassed as... |
virDomainDefCheckDuplicateDriveAddresses(const virDomainDef *def)
{
size_t i;
size_t j;
for (i = 0; i < def->ndisks; i++) {
virDomainDiskDefPtr disk_i = def->disks[i];
virDomainDeviceInfoPtr disk_info_i = &disk_i->info;
if (disk_info_i->type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_DRIVE)... | 0 | [
"CWE-212"
] | libvirt | a5b064bf4b17a9884d7d361733737fb614ad8979 | 300,163,723,749,959,200,000,000,000,000,000,000,000 | 93 | 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... |
irc_ctcp_replace_variables (struct t_irc_server *server, const char *format)
{
char *res, *temp, *username, *realname;
const char *info;
time_t now;
struct tm *local_time;
char buf[1024];
struct utsname *buf_uname;
/*
* $clientinfo: supported CTCP, example:
* ACTION DCC CLIENTIN... | 0 | [
"CWE-119",
"CWE-787"
] | weechat | 2fb346f25f79e412cf0ed314fdf791763c19b70b | 198,945,478,047,120,170,000,000,000,000,000,000,000 | 173 | irc: fix parsing of DCC filename |
TEST(GteOp, ElemMatchKey) {
BSONObj operand = BSON("$gte" << 5);
GTEMatchExpression gte("a", operand["$gte"]);
MatchDetails details;
details.requestElemMatchKey();
ASSERT(!gte.matchesBSON(BSON("a" << 4), &details));
ASSERT(!details.hasElemMatchKey());
ASSERT(gte.matchesBSON(BSON("a" << 6), &... | 0 | [] | mongo | 64095239f41e9f3841d8be9088347db56d35c891 | 154,568,994,973,075,070,000,000,000,000,000,000,000 | 13 | SERVER-51083 Reject invalid UTF-8 from $regex match expressions |
static void h264_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type,
int (*mv)[2][4][2],
int mb_x, int mb_y, int mb_intra, int mb_skipped)
{
H264Context *h = opaque;
h->mb_x = mb_x;
h->mb_y = mb_y;
h->mb_xy = mb_x + mb_y * h->mb_str... | 0 | [
"CWE-787"
] | FFmpeg | 1f097d168d9cad473dd44010a337c1413a9cd198 | 152,324,338,900,874,800,000,000,000,000,000,000,000 | 25 | h264: reset data partitioning at the beginning of each decode call
Prevents using GetBitContexts with data from previous calls.
Fixes access to freed memory.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org |
static int read_var_sized(struct archive_read* a, size_t* pvalue,
size_t* pvalue_len)
{
uint64_t v;
uint64_t v_size = 0;
const int ret = pvalue_len ? read_var(a, &v, &v_size)
: read_var(a, &v, NULL);
if(ret == 1 && pvalue) {
*pvalue = (size_t) v;
}
if(pvalue_len) {
/* Possible data truncation sh... | 0 | [
"CWE-20",
"CWE-125"
] | libarchive | 94821008d6eea81e315c5881cdf739202961040a | 255,927,794,208,227,020,000,000,000,000,000,000,000 | 20 | RAR5 reader: reject files that declare invalid header flags
One of the fields in RAR5's base block structure is the size of the
header. Some invalid files declare a 0 header size setting, which can
confuse the unpacker. Minimum header size for RAR5 base blocks is 7
bytes (4 bytes for CRC, and 3 bytes for the rest), so... |
_g_time_val_to_iso8601 (GTimeVal *time_)
{
gchar *retval;
g_return_val_if_fail (time_->tv_usec >= 0 && time_->tv_usec < G_USEC_PER_SEC, NULL);
#define ISO_8601_LEN 21
#define ISO_8601_FORMAT "%Y-%m-%dT%H:%M:%SZ"
retval = g_new0 (gchar, ISO_8601_LEN + 1);
strftime (retval, ISO_8601_LEN,
ISO_860... | 0 | [] | gnome-screensaver | 284c9924969a49dbf2d5fae1d680d3310c4df4a3 | 167,826,098,386,127,830,000,000,000,000,000,000,000 | 16 | Remove session inhibitors if the originator falls of the bus
This fixes a problem where totem leaves inhibitors behind, see
bug 600488. |
static const char *set_protocol(cmd_parms *cmd, void *dummy,
const char *arg)
{
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
core_server_config *conf =
ap_get_core_module_config(cmd->server->module_config);
char* proto;
if (err != NULL) {
... | 0 | [
"CWE-416",
"CWE-284"
] | httpd | 4cc27823899e070268b906ca677ee838d07cf67a | 141,155,900,902,349,200,000,000,000,000,000,000,000 | 18 | core: Disallow Methods' registration at run time (.htaccess), they may be
used only if registered at init time (httpd.conf).
Calling ap_method_register() in children processes is not the right scope
since it won't be shared for all requests.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1807655 13f7... |
TfLiteRegistration* Register_BATCH_TO_SPACE_ND_GENERIC_OPT() {
static TfLiteRegistration r = {
nullptr, nullptr, batch_to_space_nd::Prepare,
batch_to_space_nd::Eval<batch_to_space_nd::kGenericOptimized>};
return &r;
} | 0 | [
"CWE-369"
] | tensorflow | 2c74674348a4708ced58ad6eb1b23354df8ee044 | 302,317,681,460,813,470,000,000,000,000,000,000,000 | 6 | Prevent division by 0
PiperOrigin-RevId: 370979352
Change-Id: Ic79191c316d986fc6072ecaebfec9d5f2b924d00 |
ExecIRUpdateTriggers(EState *estate, ResultRelInfo *relinfo,
HeapTuple trigtuple, TupleTableSlot *slot)
{
TriggerDesc *trigdesc = relinfo->ri_TrigDesc;
HeapTuple slottuple = ExecMaterializeSlot(slot);
HeapTuple newtuple = slottuple;
TriggerData LocTriggerData;
HeapTuple oldtuple;
int i;
LocTriggerData.t... | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 75,280,413,009,193,480,000,000,000,000,000,000,000 | 62 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static bool convert_bpf_extensions(struct sock_filter *fp,
struct bpf_insn **insnp)
{
struct bpf_insn *insn = *insnp;
u32 cnt;
switch (fp->k) {
case SKF_AD_OFF + SKF_AD_PROTOCOL:
BUILD_BUG_ON(FIELD_SIZEOF(struct sk_buff, protocol) != 2);
/* A = *(u16 *) (CTX + offsetof(protocol)) */
*insn++ = BPF_LDX... | 0 | [
"CWE-120"
] | linux | 050fad7c4534c13c8eb1d9c2ba66012e014773cb | 93,835,953,318,483,500,000,000,000,000,000,000,000 | 129 | bpf: fix truncated jump targets on heavy expansions
Recently during testing, I ran into the following panic:
[ 207.892422] Internal error: Accessing user space memory outside uaccess.h routines: 96000004 [#1] SMP
[ 207.901637] Modules linked in: binfmt_misc [...]
[ 207.966530] CPU: 45 PID: 2256 Comm: test_ve... |
static int ZEND_FASTCALL ZEND_ASSIGN_OBJ_SPEC_VAR_CONST_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_op *op_data = opline+1;
zend_free_op free_op1;
zval **object_ptr = _get_zval_ptr_ptr_var(&opline->op1, EX(Ts), &free_op1 TSRMLS_CC);
zval *property_name = &opline->op2.u.constant;
if (0... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 256,884,805,429,405,540,000,000,000,000,000,000,000 | 25 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
modify_link_hash_table (NautilusFile *file,
ModifyListFunction modify_function)
{
char *target_uri;
gboolean found;
gpointer original_key;
GList **list_ptr;
/* Check if there is a symlink name. If none, we are OK. */
if (file->details->symlink_name == NULL) {
return;
}
/* Create the hash table first time... | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 132,852,016,048,339,530,000,000,000,000,000,000,000 | 38 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
static int property_read_system_call_filter(
sd_bus *bus,
const char *member,
sd_bus_message *m,
sd_bus_error *error,
void *userdata) {
struct security_info *info = userdata;
int whitelist, r;
assert(bus);
... | 0 | [
"CWE-269"
] | systemd | 9d880b70ba5c6ca83c82952f4c90e86e56c7b70c | 246,400,256,813,003,200,000,000,000,000,000,000,000 | 52 | analyze: check for RestrictSUIDSGID= in "systemd-analyze security"
And let's give it a heigh weight, since it pretty much can be used for
bad things only. |
bool CertManager::sendBlankCert() const
{
return sendBlankCert_;
} | 0 | [
"CWE-254"
] | mysql-server | e7061f7e5a96c66cb2e0bf46bec7f6ff35801a69 | 324,520,017,395,042,100,000,000,000,000,000,000,000 | 4 | Bug #22738607: YASSL FUNCTION X509_NAME_GET_INDEX_BY_NID IS NOT WORKING AS EXPECTED. |
vmxnet3_init_msix(VMXNET3State *s)
{
PCIDevice *d = PCI_DEVICE(s);
int res = msix_init(d, VMXNET3_MAX_INTRS,
&s->msix_bar,
VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF_MSIX_TABLE,
&s->msix_bar,
VMXNET3_MSIX_BAR_IDX, VMXNET3_OFF... | 0 | [
"CWE-20"
] | qemu | a7278b36fcab9af469563bd7b9dadebe2ae25e48 | 96,233,632,281,441,420,000,000,000,000,000,000,000 | 24 | net/vmxnet3: Refine l2 header validation
Validation of l2 header length assumed minimal packet size as
eth_header + 2 * vlan_header regardless of the actual protocol.
This caused crash for valid non-IP packets shorter than 22 bytes, as
'tx_pkt->packet_type' hasn't been assigned for such packets, and
'vmxnet3_on_tx_do... |
static void test_splitting_mmio_unmap(void)
{
uc_engine *uc;
// mov ecx, [0x3004] <-- normal read
// mov ebx, [0x4004] <-- mmio read
char code[] = "\x8b\x0d\x04\x30\x00\x00\x8b\x1d\x04\x40\x00\x00";
int r_ecx, r_ebx;
int bytes = 0xdeadbeef;
OK(uc_open(UC_ARCH_X86, UC_MODE_32, &uc));
OK... | 0 | [
"CWE-476"
] | unicorn | 3d3deac5e6d38602b689c4fef5dac004f07a2e63 | 41,135,864,430,596,910,000,000,000,000,000,000,000 | 32 | Fix crash when mapping a big memory and calling uc_close |
TransposerBase::~TransposerBase()
{
}
| 0 | [
"CWE-617"
] | soundtouch | 107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260 | 193,781,643,004,261,120,000,000,000,000,000,000,000 | 3 | Replaced illegal-number-of-channel assertions with run-time exception |
_copyColumnRef(const ColumnRef *from)
{
ColumnRef *newnode = makeNode(ColumnRef);
COPY_NODE_FIELD(fields);
COPY_LOCATION_FIELD(location);
return newnode;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 317,224,842,788,601,520,000,000,000,000,000,000,000 | 9 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
static void descriptor_changes_parser(TDB_DATA key, TDB_DATA data, void *private_data)
{
struct descriptor_changes **c_ptr = (struct descriptor_changes **)private_data;
uintptr_t ptr = 0;
SMB_ASSERT(data.dsize == sizeof(ptr));
memcpy(&ptr, data.dptr, data.dsize);
*c_ptr = talloc_get_type_abort((void *)ptr, stru... | 0 | [
"CWE-200"
] | samba | 0a3aa5f908e351201dc9c4d4807b09ed9eedff77 | 317,831,879,563,185,430,000,000,000,000,000,000,000 | 11 | CVE-2022-32746 ldb: Make use of functions for appending to an ldb_message
This aims to minimise usage of the error-prone pattern of searching for
a just-added message element in order to make modifications to it (and
potentially finding the wrong element).
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15009
Signed... |
void HttpTransact::PerformRemap(State *s)
{
DebugTxn("http_trans","Inside PerformRemap");
TRANSACT_RETURN(SM_ACTION_REMAP_REQUEST, HttpTransact::EndRemapRequest);
} | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 338,870,031,505,665,930,000,000,000,000,000,000,000 | 5 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
static inline struct kvm_memslots *kvm_memslots(struct kvm *kvm)
{
return rcu_dereference_check(kvm->memslots,
srcu_read_lock_held(&kvm->srcu)
|| lockdep_is_held(&kvm->slots_lock));
} | 0 | [
"CWE-399"
] | kvm | 5b40572ed5f0344b9dbee486a17c589ce1abe1a3 | 251,569,817,002,432,340,000,000,000,000,000,000,000 | 6 | KVM: Ensure all vcpus are consistent with in-kernel irqchip settings
If some vcpus are created before KVM_CREATE_IRQCHIP, then
irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading
to potential NULL pointer dereferences.
Fix by:
- ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called
... |
void kill_block_super(struct super_block *sb)
{
struct block_device *bdev = sb->s_bdev;
fmode_t mode = sb->s_mode;
bdev->bd_super = NULL;
generic_shutdown_super(sb);
sync_blockdev(bdev);
WARN_ON_ONCE(!(mode & FMODE_EXCL));
blkdev_put(bdev, mode | FMODE_EXCL);
} | 0 | [
"CWE-17"
] | linux | eee5cc2702929fd41cce28058dc6d6717f723f87 | 86,552,325,418,752,130,000,000,000,000,000,000,000 | 11 | get rid of s_files and files_lock
The only thing we need it for is alt-sysrq-r (emergency remount r/o)
and these days we can do just as well without going through the
list of files.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
static gboolean avrcp_search_rsp(struct avctp *conn, uint8_t *operands,
size_t operand_count, void *user_data)
{
struct avrcp_browsing_header *pdu = (void *) operands;
struct avrcp *session = (void *) user_data;
struct avrcp_player *player = session->controller->player;
struct media_player *mp = player->user_d... | 0 | [
"CWE-200"
] | bluez | e2b0f0d8d63e1223bb714a9efb37e2257818268b | 38,259,273,754,786,640,000,000,000,000,000,000,000 | 27 | avrcp: Fix not checking if params_len match number of received bytes
This makes sure the number of bytes in the params_len matches the
remaining bytes received so the code don't end up accessing invalid
memory. |
void Curl_ssl_detach_conn(struct Curl_easy *data,
struct connectdata *conn)
{
if(Curl_ssl->disassociate_connection) {
Curl_ssl->disassociate_connection(data, FIRSTSOCKET);
if(conn->sock[SECONDARYSOCKET] && conn->bits.sock_accepted)
Curl_ssl->disassociate_connection(data, SECOND... | 0 | [
"CWE-416",
"CWE-295"
] | curl | 7f4a9a9b2a49547eae24d2e19bc5c346e9026479 | 172,904,383,210,970,450,000,000,000,000,000,000,000 | 9 | openssl: associate/detach the transfer from connection
CVE-2021-22901
Bug: https://curl.se/docs/CVE-2021-22901.html |
static void nf_tables_obj_notify(const struct nft_ctx *ctx,
struct nft_object *obj, int event)
{
nft_obj_notify(ctx->net, ctx->table, obj, ctx->portid, ctx->seq, event,
ctx->family, ctx->report, GFP_KERNEL);
} | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 112,422,100,910,286,670,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 pyc_object *copy_object(pyc_object *object) {
pyc_object *copy = RZ_NEW0(pyc_object);
if (!copy || !object) {
free(copy);
return NULL;
}
copy->type = object->type;
switch (object->type) {
case TYPE_NULL:
break;
case TYPE_TUPLE:
case TYPE_SMALL_TUPLE:
copy->data = rz_list_clone(object->data);
br... | 0 | [
"CWE-190"
] | rizin | e645e5827327d945307ddfde4f617ae4c36561fd | 184,253,768,645,299,650,000,000,000,000,000,000,000 | 74 | Fix the crash caused by get_long_object() #2739 from PeiweiHu/Peiwei_0625 |
unsigned lodepng_encode_memory(unsigned char** out, size_t* outsize, const unsigned char* image,
unsigned w, unsigned h, LodePNGColorType colortype, unsigned bitdepth)
{
unsigned error;
LodePNGState state;
lodepng_state_init(&state);
state.info_raw.colortype = colortype;
state.i... | 0 | [
"CWE-401"
] | FreeRDP | 9fee4ae076b1ec97b97efb79ece08d1dab4df29a | 138,104,767,239,516,320,000,000,000,000,000,000,000 | 15 | Fixed #5645: realloc return handling |
pkinit_server_plugin_fini(krb5_context context,
krb5_kdcpreauth_moddata moddata)
{
pkinit_kdc_context *realm_contexts = (pkinit_kdc_context *)moddata;
int i;
if (realm_contexts == NULL)
return;
for (i = 0; realm_contexts[i] != NULL; i++) {
pkinit_server_plugin... | 0 | [
"CWE-284",
"CWE-264"
] | krb5 | e3b5a5e5267818c97750b266df50b6a3d4649604 | 168,226,564,779,858,600,000,000,000,000,000,000,000 | 15 | Prevent requires_preauth bypass [CVE-2015-2694]
In the OTP kdcpreauth module, don't set the TKT_FLG_PRE_AUTH bit until
the request is successfully verified. In the PKINIT kdcpreauth
module, don't respond with code 0 on empty input or an unconfigured
realm. Together these bugs could cause the KDC preauth framework to... |
evbuffer_peek(struct evbuffer *buffer, ev_ssize_t len,
struct evbuffer_ptr *start_at,
struct evbuffer_iovec *vec, int n_vec)
{
struct evbuffer_chain *chain;
int idx = 0;
ev_ssize_t len_so_far = 0;
EVBUFFER_LOCK(buffer);
if (start_at) {
chain = start_at->_internal.chain;
len_so_far = chain->off
... | 0 | [
"CWE-189"
] | libevent | 20d6d4458bee5d88bda1511c225c25b2d3198d6c | 280,131,280,498,091,350,000,000,000,000,000,000,000 | 52 | Fix CVE-2014-6272 in Libevent 2.0
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap.
Also, lower the maximum chunk size to the lower of off_t, size_t maximum.
This is necessary since otherwise we could get into an infinite loop
if we ... |
static int validate_tmpl(int nr, struct xfrm_user_tmpl *ut, u16 family)
{
int i;
if (nr > XFRM_MAX_DEPTH)
return -EINVAL;
for (i = 0; i < nr; i++) {
/* We never validated the ut->family value, so many
* applications simply leave it at zero. The check was
* never made and ut->family was ignored because a... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 58,662,406,728,026,110,000,000,000,000,000,000,000 | 32 | 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 OPJ_BYTE * opj_jp2_write_cdef(opj_jp2_t *jp2,
OPJ_UINT32 * p_nb_bytes_written)
{
/* room for 8 bytes for box, 2 for n */
OPJ_UINT32 l_cdef_size = 10;
OPJ_BYTE * l_cdef_data, * l_current_cdef_ptr;
OPJ_UINT32 l_value;
OPJ_UINT16 i;
/* preconditions */
... | 0 | [
"CWE-20"
] | openjpeg | 4edb8c83374f52cd6a8f2c7c875e8ffacccb5fa5 | 156,078,900,875,320,850,000,000,000,000,000,000,000 | 50 | Add support for generation of PLT markers in encoder
* -PLT switch added to opj_compress
* Add a opj_encoder_set_extra_options() function that
accepts a PLT=YES option, and could be expanded later
for other uses.
-------
Testing with a Sentinel2 10m band, T36JTT_20160914T074612_B02.jp2,
coming from S2A_MSIL1C_20... |
connection_write_throttle (connection * const con, off_t max_bytes)
{
/*assert(max_bytes > 0);*/
max_bytes = connection_write_throttled(con, max_bytes);
if (0 == max_bytes) con->traffic_limit_reached = 1;
return max_bytes;
} | 0 | [
"CWE-703"
] | lighttpd1.4 | b03b86f47b0d5a553137f081fadc482b4af1372d | 72,714,066,974,702,130,000,000,000,000,000,000,000 | 7 | [core] fix merging large headers across mult reads (fixes #3059)
(thx mitd)
x-ref:
"Connections stuck in Close_Wait causing 100% cpu usage"
https://redmine.lighttpd.net/issues/3059 |
static inline __virtio16 cpu_to_tun16(struct tun_struct *tun, u16 val)
{
return __cpu_to_virtio16(tun_is_little_endian(tun), val);
} | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 77,945,736,420,053,250,000,000,000,000,000,000,000 | 4 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
dissect_kafka_delete_topics_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset,
kafka_api_version_t api_version)
{
proto_item *subti;
proto_tree *subtree;
/* [topic] */
subtree = proto_tree_add_subtree(tree, tvb, offset, -1,
... | 0 | [
"CWE-401"
] | wireshark | f4374967bbf9c12746b8ec3cd54dddada9dd353e | 301,459,641,868,374,320,000,000,000,000,000,000,000 | 24 | Kafka: Limit our decompression size.
Don't assume that the Internet has our best interests at heart when it
gives us the size of our decompression buffer. Assign an arbitrary limit
of 50 MB.
This fixes #16739 in that it takes care of
** (process:17681): WARNING **: 20:03:07.440: Dissector bug, protocol Kafka, in pac... |
limited_big_rand(struct RBignum *limit)
{
unsigned long mask, lim, rnd;
struct RBignum *val;
int i, len, boundary;
len = (limit->len * SIZEOF_BDIGITS + 3) / 4;
val = (struct RBignum *)rb_big_clone((VALUE)limit);
val->sign = 1;
#if SIZEOF_BDIGITS == 2
# define BIG_GET32(big,i) (((BDIGIT *)(big)-... | 0 | [
"CWE-20"
] | ruby | e926ef5233cc9f1035d3d51068abe9df8b5429da | 84,755,543,932,394,210,000,000,000,000,000,000,000 | 43 | * random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export.
* string.c (rb_str_tmp_new), intern.h: New function.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static const char *adts_dmx_probe_data(const u8 *data, u32 size, GF_FilterProbeScore *score)
{
u32 nb_frames=0, next_pos=0, max_consecutive_frames=0;
ADTSHeader prev_hdr;
GF_BitStream *bs;
Bool has_id3=GF_FALSE;
Bool has_broken_data=GF_FALSE;
/*check for id3*/
if (size>= 10) {
if (data[0] == 'I' && data[1] ==... | 0 | [
"CWE-476",
"CWE-787"
] | gpac | 22774aa9e62f586319c8f107f5bae950fed900bc | 151,352,040,519,782,410,000,000,000,000,000,000,000 | 67 | fixed potential crash in adts reframer with broken streams - cf #1723 |
ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio,
struct nfs_page *req)
{
struct nfs4_ff_layout_mirror *mirror;
struct nfs_pgio_mirror *pgm;
struct nfs4_pnfs_ds *ds;
u32 i;
retry:
ff_layout_pg_check_layout(pgio, req);
if (!pgio->pg_lseg) {
pgio->pg_lseg = pnfs_update_layout(pgio->pg_inode,
... | 0 | [
"CWE-787"
] | linux | ed34695e15aba74f45247f1ee2cf7e09d449f925 | 58,776,545,116,369,260,000,000,000,000,000,000,000 | 64 | pNFS/flexfiles: fix incorrect size check in decode_nfs_fh()
We (adam zabrocki, alexander matrosov, alexander tereshkin, maksym
bazalii) observed the check:
if (fh->size > sizeof(struct nfs_fh))
should not use the size of the nfs_fh struct which includes an extra two
bytes from the size field.
struct nfs_fh {
unsi... |
struct addr_t* MACH0_(get_entrypoint)(struct MACH0_(obj_t)* bin) {
struct addr_t *entry;
int i;
if (!bin->entry && !bin->sects) {
return NULL;
}
if (!(entry = calloc (1, sizeof (struct addr_t)))) {
return NULL;
}
if (bin->entry) {
entry->addr = entry_to_vaddr (bin);
entry->offset = addr_to_offset (bin,... | 1 | [
"CWE-416"
] | radare2 | d1e8ac62c6d978d4662f69116e30230d43033c92 | 152,109,369,906,923,980,000,000,000,000,000,000,000 | 35 | Fix null deref and uaf in mach0 parser |
static int hid_parser_reserved(struct hid_parser *parser, struct hid_item *item)
{
dbg_hid("reserved item type, tag 0x%x\n", item->tag);
return 0;
} | 0 | [
"CWE-125"
] | linux | 50220dead1650609206efe91f0cc116132d59b3f | 93,643,971,872,776,240,000,000,000,000,000,000,000 | 5 | HID: core: prevent out-of-bound readings
Plugging a Logitech DJ receiver with KASAN activated raises a bunch of
out-of-bound readings.
The fields are allocated up to MAX_USAGE, meaning that potentially, we do
not have enough fields to fit the incoming values.
Add checks and silence KASAN.
Signed-off-by: Benjamin Tis... |
static void bnx2x_io_resume(struct pci_dev *pdev)
{
struct net_device *dev = pci_get_drvdata(pdev);
struct bnx2x *bp = netdev_priv(dev);
if (bp->recovery_state != BNX2X_RECOVERY_DONE) {
netdev_err(bp->dev, "Handling parity error recovery. Try again later\n");
return;
}
rtnl_lock();
bp->fw_seq = SHMEM_RD(bp... | 0 | [
"CWE-20"
] | linux | 8914a595110a6eca69a5e275b323f5d09e18f4f9 | 38,920,744,832,073,213,000,000,000,000,000,000,000 | 22 | bnx2x: disable GSO where gso_size is too big for hardware
If a bnx2x card is passed a GSO packet with a gso_size larger than
~9700 bytes, it will cause a firmware error that will bring the card
down:
bnx2x: [bnx2x_attn_int_deasserted3:4323(enP24p1s0f0)]MC assert!
bnx2x: [bnx2x_mc_assert:720(enP24p1s0f0)]XSTORM_ASSERT... |
png_read_filter_row_up(png_row_infop row_info, png_bytep row,
png_const_bytep prev_row)
{
size_t i;
size_t istop = row_info->rowbytes;
png_bytep rp = row;
png_const_bytep pp = prev_row;
for (i = 0; i < istop; i++)
{
*rp = (png_byte)(((int)(*rp) + (int)(*pp++)) & 0xff);
rp++;
}
} | 0 | [
"CWE-190",
"CWE-369"
] | libpng | 8a05766cb74af05c04c53e6c9d60c13fc4d59bf2 | 317,903,200,705,301,100,000,000,000,000,000,000,000 | 14 | [libpng16] Fix the calculation of row_factor in png_check_chunk_length
(Bug report by Thuan Pham, SourceForge issue #278) |
compute_U_value_R3(std::string const& user_password,
QPDF::EncryptionData const& data)
{
// Algorithm 3.5 from the PDF 1.7 Reference Manual
std::string k1 = QPDF::compute_encryption_key(user_password, data);
MD5 md5;
md5.encodeDataIncrementally(
pad_or_truncate_password_V4("").c_str(), key_bytes)... | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 84,013,331,685,894,880,000,000,000,000,000,000,000 | 27 | 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 ... |
rfbClientSendString(rfbClientPtr cl, const char *reason)
{
char *buf;
int len = strlen(reason);
rfbLog("rfbClientSendString(\"%s\")\n", reason);
buf = (char *)malloc(4 + len);
if (buf) {
((uint32_t *)buf)[0] = Swap32IfLE(len);
memcpy(buf + 4, reason, len);
if (rfbWriteExac... | 0 | [
"CWE-476"
] | libvncserver | 38e98ee61d74f5f5ab4aa4c77146faad1962d6d0 | 150,776,945,585,519,180,000,000,000,000,000,000,000 | 19 | libvncserver: add missing NULL pointer checks |
void js_throw(js_State *J)
{
if (J->trytop > 0) {
js_Value v = *stackidx(J, -1);
--J->trytop;
J->E = J->trybuf[J->trytop].E;
J->envtop = J->trybuf[J->trytop].envtop;
J->tracetop = J->trybuf[J->trytop].tracetop;
J->top = J->trybuf[J->trytop].top;
J->bot = J->trybuf[J->trytop].bot;
js_pushvalue(J, v);
... | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 69,318,889,524,297,910,000,000,000,000,000,000,000 | 17 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
static irqreturn_t xenvif_tx_interrupt(int irq, void *dev_id)
{
struct xenvif *vif = dev_id;
if (RING_HAS_UNCONSUMED_REQUESTS(&vif->tx))
napi_schedule(&vif->napi);
return IRQ_HANDLED;
} | 0 | [
"CWE-399"
] | net-next | e9d8b2c2968499c1f96563e6522c56958d5a1d0d | 250,093,905,782,045,900,000,000,000,000,000,000,000 | 9 | xen-netback: disable rogue vif in kthread context
When netback discovers frontend is sending malformed packet it will
disables the interface which serves that frontend.
However disabling a network interface involving taking a mutex which
cannot be done in softirq context, so we need to defer this process to
kthread c... |
static int vmx_handle_exit(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
u32 exit_reason = vmx->exit_reason;
u32 vectoring_info = vmx->idt_vectoring_info;
trace_kvm_exit(exit_reason, vcpu, KVM_ISA_VMX);
/*
* Flush logged GPAs PML buffer, this will make dirty_bitmap more
* updated. Another goo... | 0 | [
"CWE-284"
] | linux | 727ba748e110b4de50d142edca9d6a9b7e6111d8 | 269,563,195,220,637,000,000,000,000,000,000,000,000 | 95 | kvm: nVMX: Enforce cpl=0 for VMX instructions
VMX instructions executed inside a L1 VM will always trigger a VM exit
even when executed with cpl 3. This means we must perform the
privilege check in software.
Fixes: 70f3aac964ae("kvm: nVMX: Remove superfluous VMX instruction fault checks")
Cc: stable@vger.kernel.org
S... |
njs_promise_reject(njs_vm_t *vm, njs_promise_t *promise, njs_value_t *reason)
{
njs_int_t ret;
njs_queue_t queue;
njs_promise_data_t *data;
data = njs_data(&promise->value);
data->result = *reason;
data->state = NJS_PROMISE_REJECTED;
if (!data->is_handled) {
ret... | 0 | [
"CWE-416",
"CWE-703"
] | njs | 31ed93a5623f24ca94e6d47e895ba735d9d97d46 | 183,470,428,934,862,500,000,000,000,000,000,000,000 | 34 | Fixed aggregation methods of Promise ctor with array-like object.
Previously, while iterating over an array-like object the methods may be
resolved with INVALID values. INVALID value is a special internal type which
should never be visible by ordinary functions.
The fix is to ensure that absent elements are represent... |
static tool_rc tpm2_tool_onrun(ESYS_CONTEXT *ectx, tpm2_option_flags flags) {
UNUSED(flags);
tool_rc rc = check_options();
if (rc != tool_rc_success) {
return rc;
}
rc = tpm2_util_object_load_auth(ectx, ctx.parent.ctx_path,
ctx.parent.auth_str, &ctx.parent.object, false,
... | 0 | [
"CWE-798"
] | tpm2-tools | c069e4f179d5e6653a84fb236816c375dca82515 | 61,921,641,635,398,990,000,000,000,000,000,000,000 | 18 | tpm2_import: fix fixed AES key CVE-2021-3565
tpm2_import used a fixed AES key for the inner wrapper, which means that
a MITM attack would be able to unwrap the imported key. Even the
use of an encrypted session will not prevent this. The TPM only
encrypts the first parameter which is the fixed symmetric key.
To fix t... |
have_secret_key_with_kid (u32 *keyid)
{
gpg_error_t err;
KEYDB_HANDLE kdbhd;
KEYDB_SEARCH_DESC desc;
kbnode_t keyblock;
kbnode_t node;
int result = 0;
kdbhd = keydb_new ();
memset (&desc, 0, sizeof desc);
desc.mode = KEYDB_SEARCH_MODE_LONG_KID;
desc.u.kid[0] = keyid[0];
desc.u.kid[1] = keyid[1];
... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 132,591,195,981,550,440,000,000,000,000,000,000,000 | 44 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
void GC_log_printf(const char *format, ...)
{
char buf[BUFSZ + 1];
GC_PRINTF_FILLBUF(buf, format);
# ifdef NACL
(void)WRITE(GC_log, buf, strlen(buf));
# else
if (WRITE(GC_log, buf, strlen(buf)) < 0)
ABORT("write to GC log failed");
# endif
} | 0 | [
"CWE-119"
] | bdwgc | 7292c02fac2066d39dd1bcc37d1a7054fd1e32ee | 108,371,399,607,303,690,000,000,000,000,000,000,000 | 12 | Fix malloc routines to prevent size value wrap-around
See issue #135 on Github.
* allchblk.c (GC_allochblk, GC_allochblk_nth): Use
OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS.
* malloc.c (GC_alloc_large): Likewise.
* alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed
from word to size_t; ca... |
static void StoreVarLenUint8(size_t n, size_t* storage_ix, uint8_t* storage) {
if (n == 0) {
BrotliWriteBits(1, 0, storage_ix, storage);
} else {
size_t nbits = Log2FloorNonZero(n);
BrotliWriteBits(1, 1, storage_ix, storage);
BrotliWriteBits(3, nbits, storage_ix, storage);
BrotliWriteBits(nbits,... | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 316,570,664,266,530,950,000,000,000,000,000,000,000 | 10 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
static bool __tpacket_has_room(const struct packet_sock *po, int pow_off)
{
int idx, len;
len = READ_ONCE(po->rx_ring.frame_max) + 1;
idx = READ_ONCE(po->rx_ring.head);
if (pow_off)
idx += len >> pow_off;
if (idx >= len)
idx -= len;
return packet_lookup_frame(po, &po->rx_ring, idx, TP_STATUS_KERNEL);
} | 0 | [
"CWE-787"
] | linux | acf69c946233259ab4d64f8869d4037a198c7f06 | 97,556,592,194,860,570,000,000,000,000,000,000,000 | 12 | net/packet: fix overflow in tpacket_rcv
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virt... |
AvahiSDomainBrowser *avahi_s_domain_browser_new(
AvahiServer *server,
AvahiIfIndex interface,
AvahiProtocol protocol,
const char *domain,
AvahiDomainBrowserType type,
AvahiLookupFlags flags,
AvahiSDomainBrowserCallback callback,
void* userdata) {
AvahiSDomainBrowser *b;
... | 0 | [] | avahi | 9d31939e55280a733d930b15ac9e4dda4497680c | 287,280,383,777,024,160,000,000,000,000,000,000,000 | 19 | Fix NULL pointer crashes from #175
avahi-daemon is crashing when running "ping .local".
The crash is due to failing assertion from NULL pointer.
Add missing NULL pointer checks to fix it.
Introduced in #175 - merge commit 8f75a045709a780c8cf92a6a21e9d35b593bdecd |
//! Compute image laplacian \newinstance.
CImg<Tfloat> get_laplacian() const {
if (is_empty()) return CImg<Tfloat>();
CImg<Tfloat> res(_width,_height,_depth,_spectrum);
if (_depth>1) { // 3d
cimg_pragma_openmp(parallel for cimg_openmp_if(_width*_height*_depth>=1048576 && _spectrum>=2))... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 45,038,111,736,333,870,000,000,000,000,000,000,000 | 27 | Fix other issues in 'CImg<T>::load_bmp()'. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.