func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
dissect_rpcap_open_request (tvbuff_t *tvb, packet_info *pinfo _U_,
proto_tree *parent_tree, gint offset)
{
gint len;
len = tvb_captured_length_remaining (tvb, offset);
proto_tree_add_item (parent_tree, hf_open_request, tvb, offset, len, ENC_ASCII|ENC_NA);
} | 0 | [
"CWE-20"
] | wireshark | 2c13e97d656c1c0ac4d76eb9d307664aae0e0cf7 | 336,179,148,898,756,800,000,000,000,000,000,000,000 | 8 | The WTAP_ENCAP_ETHERNET dissector needs to be passed a struct eth_phdr.
We now require that. Make it so.
Bug: 12440
Change-Id: Iffee520976b013800699bde3c6092a3e86be0d76
Reviewed-on: https://code.wireshark.org/review/15424
Reviewed-by: Guy Harris <guy@alum.mit.edu> |
static inline uint int_token(const char *str,uint length)
{
if (length < long_len) // quick normal case
return NUM;
bool neg=0;
if (*str == '+') // Remove sign and pre-zeros
{
str++; length--;
}
else if (*str == '-')
{
str++; length--;
neg=1;
}
while (*str == '0' && length)
{
... | 0 | [
"CWE-476"
] | server | 3a52569499e2f0c4d1f25db1e81617a9d9755400 | 212,250,360,870,460,530,000,000,000,000,000,000,000 | 71 | MDEV-25636: Bug report: abortion in sql/sql_parse.cc:6294
The asserion failure was caused by this query
select /*id=1*/ from t1
where
col= ( select /*id=2*/ from ... where corr_cond1
union
select /*id=4*/ from ... where corr_cond2)
Here,
- select with id=2 was correlated due to corr_cond1.... |
static int __init vmx_init(void)
{
int r, i, msr;
rdmsrl_safe(MSR_EFER, &host_efer);
for (i = 0; i < NR_VMX_MSR; ++i)
kvm_define_shared_msr(i, vmx_msr_index[i]);
vmx_io_bitmap_a = (unsigned long *)__get_free_page(GFP_KERNEL);
if (!vmx_io_bitmap_a)
return -ENOMEM;
r = -ENOMEM;
vmx_io_bitmap_b = (unsigned... | 0 | [
"CWE-20"
] | linux | bfd0a56b90005f8c8a004baf407ad90045c2b11e | 241,612,603,276,109,260,000,000,000,000,000,000,000 | 138 | nEPT: Nested INVEPT
If we let L1 use EPT, we should probably also support the INVEPT instruction.
In our current nested EPT implementation, when L1 changes its EPT table
for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in
the course of this modification already calls INVEPT. But if last level
of sh... |
LoRaMacStatus_t SetTxContinuousWave( uint16_t timeout )
{
ContinuousWaveParams_t continuousWave;
continuousWave.Channel = MacCtx.Channel;
continuousWave.Datarate = MacCtx.NvmCtx->MacParams.ChannelsDatarate;
continuousWave.TxPower = MacCtx.NvmCtx->MacParams.ChannelsTxPower;
continuousWave.Max... | 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 96,672,004,922,379,470,000,000,000,000,000,000,000 | 17 | Added received buffer size checks. |
static int jpc_dec_tilefini(jpc_dec_t *dec, jpc_dec_tile_t *tile)
{
jpc_dec_tcomp_t *tcomp;
int compno;
int bandno;
int rlvlno;
jpc_dec_band_t *band;
jpc_dec_rlvl_t *rlvl;
int prcno;
jpc_dec_prc_t *prc;
jpc_dec_seg_t *seg;
jpc_dec_cblk_t *cblk;
int cblkno;
if (tile->tcomps) {
for (compno = 0, tcomp = tile... | 0 | [
"CWE-189"
] | jasper | 3c55b399c36ef46befcb21e4ebc4799367f89684 | 54,903,208,423,080,670,000,000,000,000,000,000,000 | 106 | At many places in the code, jas_malloc or jas_recalloc was being
invoked with the size argument being computed in a manner that would not
allow integer overflow to be detected. Now, these places in the code
have been modified to use special-purpose memory allocation functions
(e.g., jas_alloc2, jas_alloc3, jas_realloc... |
void zmq::stream_engine_t::zap_msg_available ()
{
zmq_assert (mechanism != NULL);
const int rc = mechanism->zap_msg_available ();
if (rc == -1) {
error (protocol_error);
return;
}
if (input_stopped)
restart_input ();
if (output_stopped)
restart_output ();
} | 0 | [] | libzmq | 77f14aad95cdf0d2a244ae9b4a025e5ba0adf01a | 131,524,135,208,941,490,000,000,000,000,000,000,000 | 14 | Problem: stream_engine.cpp security can be downgraded
Solution: accept only the mechanism defined by the socket options.
I've not tested this yet, so it's a speculative fix. |
_g_path_is_parent_of (const char *dirname,
const char *filename)
{
int dirname_l, filename_l, separator_position;
if ((dirname == NULL) || (filename == NULL))
return FALSE;
dirname_l = strlen (dirname);
filename_l = strlen (filename);
if ((dirname_l == filename_l + 1)
&& (dirname[dirname_l - 1] ... | 0 | [
"CWE-22"
] | file-roller | b147281293a8307808475e102a14857055f81631 | 58,679,317,987,952,370,000,000,000,000,000,000,000 | 28 | libarchive: sanitize filenames before extracting |
static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu)
{
struct vcpu_vmx *vmx = to_vmx(vcpu);
unsigned long debugctlmsr;
/* Record the guest's net vcpu time for enforced NMI injections. */
if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked))
vmx->entry_time = ktime_get();
/* Don't enter VMX if g... | 1 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | d974baa398f34393db76be45f7d4d04fbdbb4a0a | 10,928,605,640,962,660,000,000,000,000,000,000,000 | 191 | x86,kvm,vmx: Preserve CR4 across VM entry
CR4 isn't constant; at least the TSD and PCE bits can vary.
TBH, treating CR0 and CR3 as constant scares me a bit, too, but it looks
like it's correct.
This adds a branch and a read from cr4 to each vm entry. Because it is
extremely likely that consecutive entries into the ... |
void AOClient::pktBeginLoad(AreaData* area, int argc, QStringList argv, AOPacket packet)
{
// Evidence isn't loaded during this part anymore
// As a result, we can always send "0" for evidence length
// Client only cares about what it gets from LE
sendPacket("SI", {QString::number(server->characters.len... | 0 | [
"CWE-703",
"CWE-129"
] | akashi | 5566cdfedddef1f219aee33477d9c9690bf2f78b | 46,972,725,881,465,990,000,000,000,000,000,000,000 | 7 | Fix out of bounds crash on evidence |
_send_message_stanza(xmpp_stanza_t *const stanza)
{
char *text;
size_t text_size;
xmpp_stanza_to_text(stanza, &text, &text_size);
xmpp_conn_t *conn = connection_get_conn();
char *plugin_text = plugins_on_message_stanza_send(text);
if (plugin_text) {
xmpp_send_raw_string(conn, "%s", plug... | 0 | [
"CWE-20",
"CWE-346"
] | profanity | 8e75437a7e43d4c55e861691f74892e666e29b0b | 126,004,278,549,087,920,000,000,000,000,000,000,000 | 16 | Add carbons from check |
int qemu_ram_resize(RAMBlock *block, ram_addr_t newsize, Error **errp)
{
const ram_addr_t oldsize = block->used_length;
const ram_addr_t unaligned_size = newsize;
assert(block);
newsize = HOST_PAGE_ALIGN(newsize);
if (block->used_length == newsize) {
/*
* We don't have to resize ... | 0 | [
"CWE-908"
] | qemu | 418ade7849ce7641c0f7333718caf5091a02fd4c | 203,687,006,955,446,860,000,000,000,000,000,000,000 | 54 | softmmu: Always initialize xlat in address_space_translate_for_iotlb
The bug is an uninitialized memory read, along the translate_fail
path, which results in garbage being read from iotlb_to_section,
which can lead to a crash in io_readx/io_writex.
The bug may be fixed by writing any value with zero
in ~TARGET_PAGE_M... |
GF_Err tref_Size(GF_Box *s)
{
return GF_OK; | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 72,244,884,612,092,100,000,000,000,000,000,000,000 | 4 | prevent dref memleak on invalid input (#1183) |
void mi_check_print_warning(MI_CHECK *param, const char *fmt,...)
{
param->warning_printed=1;
param->out_flag|= O_DATA_LOST;
va_list args;
va_start(args, fmt);
mi_check_print_msg(param, "warning", fmt, args);
va_end(args);
} | 0 | [
"CWE-362"
] | mysql-server | 4e5473862e6852b0f3802b0cd0c6fa10b5253291 | 324,232,947,422,302,370,000,000,000,000,000,000,000 | 9 | Bug#24388746: PRIVILEGE ESCALATION AND RACE CONDITION USING CREATE TABLE
During REPAIR TABLE of a MyISAM table, a temporary data file (.TMD)
is created. When repair finishes, this file is renamed to the original
.MYD file. The problem was that during this rename, we copied the
stats from the old file to the new file w... |
stl_match_neighbors_exact(stl_file *stl,
stl_hash_edge *edge_a, stl_hash_edge *edge_b) {
if (stl->error) return;
stl_record_neighbors(stl, edge_a, edge_b);
} | 0 | [
"CWE-125"
] | admesh | e84d8353f1347e1f26f0a95770d92ba14e6ede38 | 237,394,598,545,337,470,000,000,000,000,000,000,000 | 5 | Fix heap buffer overflow in stl_update_connects_remove_1
- Add argument value check to the stl_update_connects_remove_1
- Add neighbor value check in stl_remove_degenerate
Fixes https://github.com/admesh/admesh/issues/28
Merges https://github.com/admesh/admesh/pull/55 |
static int ath10k_usb_bmi_exchange_msg(struct ath10k *ar,
void *req, u32 req_len,
void *resp, u32 *resp_len)
{
int ret;
if (req) {
ret = ath10k_usb_submit_ctrl_out(ar,
ATH10K_USB_CONTROL_REQ_SEND_BMI_CMD,
0, 0, req, req_len);
if (ret) {
ath10k_warn(ar,
"unable to se... | 0 | [
"CWE-476"
] | linux | bfd6e6e6c5d2ee43a3d9902b36e01fc7527ebb27 | 179,631,229,012,417,670,000,000,000,000,000,000,000 | 32 | ath10k: Fix a NULL-ptr-deref bug in ath10k_usb_alloc_urb_from_pipe
The `ar_usb` field of `ath10k_usb_pipe_usb_pipe` objects
are initialized to point to the containing `ath10k_usb` object
according to endpoint descriptors read from the device side, as shown
below in `ath10k_usb_setup_pipe_resources`:
for (i = 0; i < i... |
TfLiteStatus CheckShapes(TfLiteContext* context, const RuntimeShape& indices,
const RuntimeShape& updates,
const RuntimeShape& shape_shape,
const IndicesT* shape_data) {
TF_LITE_ENSURE(context, (indices.DimensionsCount() >= 1) &&
... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 186,833,548,945,760,880,000,000,000,000,000,000,000 | 22 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
bool get_date(THD *thd, MYSQL_TIME *ltime, date_mode_t fuzzydate)
{ return get_date_from_real(thd, ltime, fuzzydate); } | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 220,518,409,556,033,700,000,000,000,000,000,000,000 | 2 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
const ZSTD_CDict* ZSTD_initStaticCDict(
void* workspace, size_t workspaceSize,
const void* dict, size_t dictSize,
ZSTD_dictLoadMethod_e dictLoadMethod,
ZSTD_dictContentType_e dictContentType,
... | 0 | [
"CWE-362"
] | zstd | 3e5cdf1b6a85843e991d7d10f6a2567c15580da0 | 292,393,245,212,241,780,000,000,000,000,000,000,000 | 35 | fixed T36302429 |
}
//! Return a reference to the minimum pixel value of the instance list and return the minimum value as well \const.
template<typename t>
const T& max_min(t& min_val) const {
bool is_all_empty = true;
T *ptr_max = 0;
cimglist_for(*this,l) if (!_data[l].is_empty()) {
ptr_max =... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 71,171,893,334,908,710,000,000,000,000,000,000,000 | 25 | . |
static unsigned php_unicode_tolower_raw(unsigned code, enum mbfl_no_encoding enc)
{
if (code < 0x80) {
/* Fast path for ASCII */
if (code >= 0x41 && code <= 0x5A) {
if (UNEXPECTED(enc == mbfl_no_encoding_8859_9 && code == 0x0049L)) {
return 0x0131L;
}
return code + 0x20;
}
return code;
} else {
... | 0 | [
"CWE-787"
] | php-src | 69155120e68d2e614d5c300974a1a5610cfa2e8b | 302,139,138,788,793,820,000,000,000,000,000,000,000 | 22 | Fix #79371: mb_strtolower (UTF-32LE): stack-buffer-overflow
We make sure that negative values are properly compared. |
dtls1_hm_fragment_free(hm_fragment *frag)
{
if (frag->msg_header.is_ccs)
{
EVP_CIPHER_CTX_free(frag->msg_header.saved_retransmit_state.enc_write_ctx);
EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash);
}
if (frag->fragment) OPENSSL_free(frag->fragment);
if (frag->reassembly) OPENSSL_fr... | 0 | [
"CWE-310"
] | openssl | 34628967f1e65dc8f34e000f0f5518e21afbfc7b | 317,231,671,543,002,880,000,000,000,000,000,000,000 | 12 | Fix DTLS retransmission from previous session.
For DTLS we might need to retransmit messages from the previous session
so keep a copy of write context in DTLS retransmission buffers instead
of replacing it after sending CCS. CVE-2013-6450. |
_TIFFmalloc(tmsize_t s)
{
return (malloc((size_t) s));
} | 1 | [
"CWE-369"
] | libtiff | 3c5eb8b1be544e41d2c336191bc4936300ad7543 | 40,764,188,025,181,080,000,000,000,000,000,000,000 | 4 | * libtiff/tif_{unix,vms,win32}.c (_TIFFmalloc): ANSI C does not
require malloc() to return NULL pointer if requested allocation
size is zero. Assure that _TIFFmalloc does. |
hl2vtermAttr(int attr, cellattr_T *cell)
{
vim_memset(&cell->attrs, 0, sizeof(VTermScreenCellAttrs));
if (attr & HL_BOLD)
cell->attrs.bold = 1;
if (attr & HL_UNDERLINE)
cell->attrs.underline = 1;
if (attr & HL_ITALIC)
cell->attrs.italic = 1;
if (attr & HL_STRIKETHROUGH)
cell->attrs.strike = 1;
... | 0 | [
"CWE-476"
] | vim | cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8 | 99,260,481,369,361,300,000,000,000,000,000,000,000 | 14 | patch 8.1.0633: crash when out of memory while opening a terminal window
Problem: Crash when out of memory while opening a terminal window.
Solution: Handle out-of-memory more gracefully. |
static void kvm_vcpu_ioctl_x86_get_vcpu_events(struct kvm_vcpu *vcpu,
struct kvm_vcpu_events *events)
{
process_nmi(vcpu);
events->exception.injected =
vcpu->arch.exception.pending &&
!kvm_exception_is_soft(vcpu->arch.exception.nr);
events->exception.nr = vcpu->arch.exception.nr;
events->exception.h... | 0 | [] | kvm | 0769c5de24621141c953fbe1f943582d37cb4244 | 146,064,805,748,316,500,000,000,000,000,000,000,000 | 32 | KVM: x86: extend "struct x86_emulate_ops" with "get_cpuid"
In order to be able to proceed checks on CPU-specific properties
within the emulator, function "get_cpuid" is introduced.
With "get_cpuid" it is possible to virtually call the guests
"cpuid"-opcode without changing the VM's context.
[mtosatti: cleanup/beautif... |
static const char *create_index(void)
{
const char *tmpfile;
struct pack_idx_entry **idx, **c, **last;
struct object_entry *e;
struct object_entry_pool *o;
/* Build the table of object IDs. */
ALLOC_ARRAY(idx, object_count);
c = idx;
for (o = blocks; o; o = o->next_pool)
for (e = o->next_free; e-- != o->entr... | 0 | [] | git | 68061e3470210703cb15594194718d35094afdc0 | 167,937,646,145,379,790,000,000,000,000,000,000,000 | 22 | fast-import: disallow "feature export-marks" by default
The fast-import stream command "feature export-marks=<path>" lets the
stream write marks to an arbitrary path. This may be surprising if you
are running fast-import against an untrusted input (which otherwise
cannot do anything except update Git objects and refs)... |
mono_module_file_get_object (MonoDomain *domain, MonoImage *image, int table_index)
{
static MonoClass *module_type;
MonoReflectionModule *res;
MonoTableInfo *table;
guint32 cols [MONO_FILE_SIZE];
const char *name;
guint32 i, name_idx;
const char *val;
if (!module_type) {
MonoClass *class = mono_class_from_... | 0 | [
"CWE-20"
] | mono | 65292a69c837b8a5f7a392d34db63de592153358 | 183,523,432,991,916,970,000,000,000,000,000,000,000 | 44 | 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 |
static void comps_objmrtree_create(COMPS_ObjMRTree *rtree, COMPS_Object **args){
(void)args;
rtree->subnodes = comps_hslist_create();
comps_hslist_init(rtree->subnodes, NULL, NULL, &comps_objmrtree_data_destroy_v);
if (rtree->subnodes == NULL) {
COMPS_OBJECT_DESTROY(rtree);
return;
}... | 0 | [
"CWE-416",
"CWE-862"
] | libcomps | e3a5d056633677959ad924a51758876d415e7046 | 32,829,592,522,895,640,000,000,000,000,000,000,000 | 10 | Fix UAF in comps_objmrtree_unite function
The added field is not used at all in many places and it is probably the
left-over of some copy-paste. |
cifs_demultiplex_thread(struct TCP_Server_Info *server)
{
int length;
unsigned int pdu_length, total_read;
struct smb_hdr *smb_buffer = NULL;
struct smb_hdr *bigbuf = NULL;
struct smb_hdr *smallbuf = NULL;
struct msghdr smb_msg;
struct kvec iov;
struct socket *csocket = server->ssocket;
struct list_head *tmp, ... | 0 | [
"CWE-20"
] | linux | 70945643722ffeac779d2529a348f99567fa5c33 | 301,835,664,613,294,150,000,000,000,000,000,000,000 | 419 | cifs: always do is_path_accessible check in cifs_mount
Currently, we skip doing the is_path_accessible check in cifs_mount if
there is no prefixpath. I have a report of at least one server however
that allows a TREE_CONNECT to a share that has a DFS referral at its
root. The reporter in this case was using a UNC that ... |
robj *streamTypeLookupWriteOrCreate(client *c, robj *key, int no_create) {
robj *o = lookupKeyWrite(c->db,key);
if (checkType(c,o,OBJ_STREAM)) return NULL;
if (o == NULL) {
if (no_create) {
addReplyNull(c);
return NULL;
}
o = createStreamObject();
dbAd... | 0 | [
"CWE-703",
"CWE-401"
] | redis | 4a7a4e42db8ff757cdf3f4a824f66426036034ef | 188,008,434,212,197,940,000,000,000,000,000,000,000 | 13 | Fix memory leak in streamGetEdgeID (#10753)
si is initialized by streamIteratorStart(), we should call
streamIteratorStop() on it when done.
regression introduced in #9127 (redis 7.0) |
static int link_new_carrier_maps(Link *link) {
int r;
r = link_new_bound_by_list(link);
if (r < 0)
return r;
r = link_handle_bound_by_list(link);
if (r < 0)
return r;
r = link_new_bound_to_list(link);
if (r < 0)
r... | 0 | [
"CWE-120"
] | systemd | f5a8c43f39937d97c9ed75e3fe8621945b42b0db | 111,565,316,636,557,090,000,000,000,000,000,000,000 | 21 | networkd: IPv6 router discovery - follow IPv6AcceptRouterAdvertisemnt=
The previous behavior:
When DHCPv6 was enabled, router discover was performed first, and then DHCPv6 was
enabled only if the relevant flags were passed in the Router Advertisement message.
Moreover, router discovery was performed even if AcceptRout... |
static int cm_validate_req_param(struct ib_cm_req_param *param)
{
/* peer-to-peer not supported */
if (param->peer_to_peer)
return -EINVAL;
if (!param->primary_path)
return -EINVAL;
if (param->qp_type != IB_QPT_RC && param->qp_type != IB_QPT_UC &&
param->qp_type != IB_QPT_XRC_INI)
return -EINVAL;
if ... | 0 | [
"CWE-20"
] | linux | b2853fd6c2d0f383dbdf7427e263eb576a633867 | 17,367,786,726,837,833,000,000,000,000,000,000,000 | 24 | 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... |
xmlTextReaderReadInnerXml(xmlTextReaderPtr reader ATTRIBUTE_UNUSED)
{
xmlChar *resbuf;
xmlNodePtr node, cur_node;
xmlBufferPtr buff, buff2;
xmlDocPtr doc;
if (xmlTextReaderExpand(reader) == NULL) {
return NULL;
}
doc = reader->doc;
buff = xmlBufferCreate();
for (cur_node = r... | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 38,196,421,790,906,960,000,000,000,000,000,000,000 | 32 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. |
int CascadeClassifierImpl::runAt( Ptr<FeatureEvaluator>& evaluator, Point pt, int scaleIdx, double& weight )
{
CV_INSTRUMENT_REGION();
assert( !oldCascade &&
(data.featureType == FeatureEvaluator::HAAR ||
data.featureType == FeatureEvaluator::LBP ||
data.featureType == Featur... | 0 | [
"CWE-125"
] | opencv | 321c74ccd6077bdea1d47450ca4fe955cb5b6330 | 177,917,059,418,640,120,000,000,000,000,000,000,000 | 30 | objdetect: validate feature rectangle on reading |
static int decompress_i(AVCodecContext *avctx, uint32_t *dst, int linesize)
{
SCPRContext *s = avctx->priv_data;
GetByteContext *gb = &s->gb;
int cx = 0, cx1 = 0, k = 0, clr = 0;
int run, r, g, b, off, y = 0, x = 0, z, ret;
unsigned backstep = linesize - avctx->width;
const int cxshift = s->cxsh... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 2171dfae8c065878a2e130390eb78cf2947a5b69 | 142,951,812,298,577,100,000,000,000,000,000,000,000 | 204 | avcodec/scpr: Fix multiple runtime error: index 256 out of bounds for type 'unsigned int [256]'
Fixes: 1519/clusterfuzz-testcase-minimized-5286680976162816
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
PHP_FUNCTION(xmlrpc_decode_request)
{
char *xml, *encoding = NULL;
zval *method;
size_t xml_len, encoding_len = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "sz/|s", &xml, &xml_len, &method, &encoding, &encoding_len) == FAILURE) {
return;
}
if (USED_RET()) {
decode_request_worker(xml, xml_len, encoding_len... | 0 | [] | php-src | f3c1863aa2721343245b63ac7bd68cfdc3dd41f3 | 107,225,803,555,329,190,000,000,000,000,000,000,000 | 14 | Fixed #70728
Conflicts:
ext/xmlrpc/xmlrpc-epi-php.c |
HSideEffectMap* dominators() { return &dominators_; } | 0 | [] | node | fd80a31e0697d6317ce8c2d289575399f4e06d21 | 56,204,264,043,613,320,000,000,000,000,000,000,000 | 1 | deps: backport 5f836c from v8 upstream
Original commit message:
Fix Hydrogen bounds check elimination
When combining bounds checks, they must all be moved before the first load/store
that they are guarding.
BUG=chromium:344186
LOG=y
R=svenpanne@chromium.org
Review URL: https://coderevie... |
u_check(int newhead_may_be_NULL)
{
seen_b_u_newhead = 0;
seen_b_u_curhead = 0;
header_count = 0;
u_check_tree(curbuf->b_u_oldhead, NULL, NULL);
if (seen_b_u_newhead == 0 && curbuf->b_u_oldhead != NULL
&& !(newhead_may_be_NULL && curbuf->b_u_newhead == NULL))
semsg("b_u_newhead invalid: 0x%x"... | 0 | [
"CWE-125",
"CWE-787"
] | vim | 8d02ce1ed75d008c34a5c9aaa51b67cbb9d33baa | 132,877,941,198,020,130,000,000,000,000,000,000,000 | 20 | patch 8.2.4217: illegal memory access when undo makes Visual area invalid
Problem: Illegal memory access when undo makes Visual area invalid.
Solution: Correct the Visual area after undo. |
static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval)
{
var_entries *var_hash = (*var_hashx)->last;
#if VAR_ENTRIES_DBG
fprintf(stderr, "var_push(%ld): %d\n", var_hash?var_hash->used_slots:-1L, Z_TYPE_PP(rval));
#endif
if (!var_hash || var_hash->used_slots == VAR_ENTRIES_MAX) {
var_hash = em... | 0 | [
"CWE-189"
] | php-src | 56754a7f9eba0e4f559b6ca081d9f2a447b3f159 | 306,014,159,174,181,000,000,000,000,000,000,000,000 | 23 | Fixed bug #68044: Integer overflow in unserialize() (32-bits only) |
Returns the name of the mode specified by the descriptor td */
PHP_FUNCTION(mcrypt_enc_get_modes_name)
{
char *name;
MCRYPT_GET_TD_ARG
name = mcrypt_enc_get_modes_name(pm->td);
RETVAL_STRING(name, 1);
mcrypt_free(name); | 0 | [
"CWE-190"
] | php-src | 6c5211a0cef0cc2854eaa387e0eb036e012904d0 | 188,709,041,668,213,000,000,000,000,000,000,000,000 | 9 | Fix bug #72455: Heap Overflow due to integer overflows |
static bool ldb_dn_explode(struct ldb_dn *dn)
{
char *p, *ex_name = NULL, *ex_value = NULL, *data, *d, *dt, *t;
bool trim = true;
bool in_extended = true;
bool in_ex_name = false;
bool in_ex_value = false;
bool in_attr = false;
bool in_value = false;
bool in_quote = false;
bool is_oid = false;
bool escape = f... | 0 | [
"CWE-200"
] | samba | f36cb71c330a52106e36028b3029d952257baf15 | 53,892,054,073,763,700,000,000,000,000,000,000,000 | 452 | CVE-2015-5330: ldb_dn_explode: copy strings by length, not terminators
That is, memdup(), not strdup(). The terminators might not be there.
But, we have to make sure we put the terminator on, because we tend to
assume the terminator is there in other places.
Use talloc_set_name_const() on the resulting chunk so tall... |
void * nedrealloc(void *mem, size_t size) THROWSPEC { return nedprealloc(0, mem, size); } | 0 | [
"CWE-119",
"CWE-787"
] | git | 34fa79a6cde56d6d428ab0d3160cb094ebad3305 | 29,139,731,920,950,305,000,000,000,000,000,000,000 | 1 | prefer memcpy to strcpy
When we already know the length of a string (e.g., because
we just malloc'd to fit it), it's nicer to use memcpy than
strcpy, as it makes it more obvious that we are not going to
overflow the buffer (because the size we pass matches the
size in the allocation).
This also eliminates calls to st... |
void ConnectionHandlerImpl::ActiveTcpListener::deferredRemoveFilterChains(
const std::list<const Network::FilterChain*>& draining_filter_chains) {
// Need to recover the original deleting state.
const bool was_deleting = is_deleting_;
is_deleting_ = true;
for (const auto* filter_chain : draining_filter_chai... | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 165,101,669,208,585,200,000,000,000,000,000,000,000 | 22 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
int fsnotify(struct inode *to_tell, __u32 mask, const void *data, int data_is,
const unsigned char *file_name, u32 cookie)
{
struct hlist_node *inode_node = NULL, *vfsmount_node = NULL;
struct fsnotify_mark *inode_mark = NULL, *vfsmount_mark = NULL;
struct fsnotify_group *inode_group, *vfsmount_group;
struct ... | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 13,252,234,958,666,662,000,000,000,000,000,000,000 | 122 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
static int prepare_signal(int sig, struct task_struct *p, bool force)
{
struct signal_struct *signal = p->signal;
struct task_struct *t;
if (unlikely(signal->flags & SIGNAL_GROUP_EXIT)) {
/*
* The process is in the middle of dying, nothing to do.
*/
} else if (sig_kernel_stop(sig)) {
/*
* This is a st... | 0 | [
"CWE-399"
] | linux | b9e146d8eb3b9ecae5086d373b50fa0c1f3e7f0f | 167,657,982,954,003,000,000,000,000,000,000,000,000 | 62 | kernel/signal.c: stop info leak via the tkill and the tgkill syscalls
This fixes a kernel memory contents leak via the tkill and tgkill syscalls
for compat processes.
This is visible in the siginfo_t->_sifields._rt.si_sigval.sival_ptr field
when handling signals delivered from tkill.
The place of the infoleak:
int ... |
HttpHeader::findEntry(Http::HdrType id) const
{
assert(any_registered_header(id));
assert(!Http::HeaderLookupTable.lookup(id).list);
/* check mask first */
if (!CBIT_TEST(mask, id))
return NULL;
/* looks like we must have it, do linear search */
for (auto e : entries) {
if (e ... | 0 | [
"CWE-444"
] | squid | 9c8e2a71aa1d3c159a319d9365c346c48dc783a5 | 217,650,857,299,567,500,000,000,000,000,000,000,000 | 20 | Enforce token characters for field-name (#700)
RFC 7230 defines field-name as a token. Request splitting and cache
poisoning attacks have used non-token characters to fool broken HTTP
agents behind or in front of Squid for years. This change should
significantly reduce that abuse.
If we discover exceptional situatio... |
ofputil_put_phy_port(enum ofp_version ofp_version,
const struct ofputil_phy_port *pp, struct ofpbuf *b)
{
switch (ofp_version) {
case OFP10_VERSION: {
struct ofp10_phy_port *opp = ofpbuf_put_uninit(b, sizeof *opp);
ofputil_encode_ofp10_phy_port(pp, opp);
break;
}... | 0 | [
"CWE-617",
"CWE-703"
] | ovs | 4af6da3b275b764b1afe194df6499b33d2bf4cde | 155,446,653,283,628,300,000,000,000,000,000,000,000 | 28 | ofp-group: Don't assert-fail decoding bad OF1.5 group mod type or command.
When decoding a group mod, the current code validates the group type and
command after the whole group mod has been decoded. The OF1.5 decoder,
however, tries to use the type and command earlier, when it might still be
invalid. This caused an... |
int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb)
{
/* Never answer to SYNs send to broadcast or multicast */
if (skb_rtable(skb)->rt_flags & (RTCF_BROADCAST | RTCF_MULTICAST))
goto drop;
return tcp_conn_request(&tcp_request_sock_ops,
&tcp_request_sock_ipv4_ops, sk, skb);
drop:
tcp_listendrop(sk... | 0 | [
"CWE-284"
] | linux | ac6e780070e30e4c35bd395acfe9191e6268bdd3 | 245,816,740,521,358,370,000,000,000,000,000,000,000 | 13 | tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()
Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.
We ... |
int blkid_partlist_increment_partno(blkid_partlist ls)
{
return ls ? ls->next_partno++ : -1;
} | 0 | [] | util-linux | 50d1594c2e6142a3b51d2143c74027480df082e0 | 134,258,453,055,952,620,000,000,000,000,000,000,000 | 4 | libblkid: avoid non-empty recursion in EBR
This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f.
We also need to detect non-empty recursion in the EBR chain. It's
possible to create standard valid logical partitions and in the last one
points back to the EBR chain. In this case all offsets will be ... |
static int fuse_inode_eq(struct inode *inode, void *_nodeidp)
{
u64 nodeid = *(u64 *) _nodeidp;
if (get_node_id(inode) == nodeid)
return 1;
else
return 0;
} | 0 | [
"CWE-459"
] | linux | 5d069dbe8aaf2a197142558b6fb2978189ba3454 | 296,928,549,729,715,060,000,000,000,000,000,000,000 | 8 | fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):
The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory. After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which,... |
long dtls1_ctrl(SSL *s, int cmd, long larg, void *parg)
{
int ret=0;
switch (cmd)
{
case DTLS_CTRL_GET_TIMEOUT:
if (dtls1_get_timeout(s, (struct timeval*) parg) != NULL)
{
ret = 1;
}
break;
case DTLS_CTRL_HANDLE_TIMEOUT:
ret = dtls1_handle_timeout(s);
break;
case DTLS_CTRL_LISTEN:
ret = dtls... | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 115,290,334,840,169,090,000,000,000,000,000,000,000 | 44 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
static void nfs_dentry_handle_enoent(struct dentry *dentry)
{
if (simple_positive(dentry))
d_delete(dentry);
} | 0 | [
"CWE-909"
] | linux | ac795161c93699d600db16c1a8cc23a65a1eceaf | 139,939,246,048,227,200,000,000,000,000,000,000,000 | 5 | NFSv4: Handle case where the lookup of a directory fails
If the application sets the O_DIRECTORY flag, and tries to open a
regular file, nfs_atomic_open() will punt to doing a regular lookup.
If the server then returns a regular file, we will happily return a
file descriptor with uninitialised open state.
The fix is ... |
static bool create_nic(char *nic, char *br, int pid, char **cnic)
{
char *veth1buf, *veth2buf;
veth1buf = alloca(IFNAMSIZ);
veth2buf = alloca(IFNAMSIZ);
int ret, mtu;
ret = snprintf(veth1buf, IFNAMSIZ, "%s", nic);
if (ret < 0 || ret >= IFNAMSIZ) {
fprintf(stderr, "host nic name too long\n");
return false;
}... | 0 | [
"CWE-284",
"CWE-862"
] | lxc | 16af238036a5464ae8f2420ed3af214f0de875f9 | 209,450,801,470,510,300,000,000,000,000,000,000,000 | 50 | CVE-2017-5985: Ensure target netns is caller-owned
Before this commit, lxc-user-nic could potentially have been tricked into
operating on a network namespace over which the caller did not hold privilege.
This commit ensures that the caller is privileged over the network namespace by
temporarily dropping privilege.
L... |
filter_builtins_data(struct filter_session *fs, struct filter *filter, uint64_t reqid, const char *param)
{
return filter_builtins_global(fs, filter, reqid);
} | 0 | [
"CWE-476"
] | src | 6c3220444ed06b5796dedfd53a0f4becd903c0d1 | 83,486,623,497,554,610,000,000,000,000,000,000,000 | 4 | smtpd's filter state machine can prematurely release resources
leading to a crash. From gilles@ |
virtual void updateCTM(GfxState *state, double m11, double m12,
double m21, double m22, double m31, double m32) { } | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 190,511,962,839,593,100,000,000,000,000,000,000,000 | 2 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
f_getwinvar(typval_T *argvars, typval_T *rettv)
{
getwinvar(argvars, rettv, 0);
} | 0 | [
"CWE-78"
] | vim | 8c62a08faf89663e5633dc5036cd8695c80f1075 | 105,135,449,548,828,980,000,000,000,000,000,000,000 | 4 | patch 8.1.0881: can execute shell commands in rvim through interfaces
Problem: Can execute shell commands in rvim through interfaces.
Solution: Disable using interfaces in restricted mode. Allow for writing
file with writefile(), histadd() and a few others. |
static struct inet6_dev *addrconf_add_dev(struct net_device *dev)
{
struct inet6_dev *idev;
ASSERT_RTNL();
idev = ipv6_find_idev(dev);
if (!idev)
return ERR_PTR(-ENOBUFS);
if (idev->cnf.disable_ipv6)
return ERR_PTR(-EACCES);
/* Add default multicast route */
if (!(dev->flags & IFF_LOOPBACK))
addrconf_a... | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 340,216,633,151,289,800,000,000,000,000,000,000,000 | 19 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
char* gf_wcs_to_utf8(const wchar_t* str)
{
size_t source_len;
char* result;
if (str == 0) return 0;
source_len = wcslen(str);
result = gf_calloc(source_len + 1, UTF8_MAX_BYTES_PER_CHAR);
if (!result)
return 0;
if (gf_utf8_wcstombs(result, source_len * UTF8_MAX_BYTES_PER_CHAR, &str) == GF_UTF8_FAIL) {
gf_free... | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 311,743,708,553,262,100,000,000,000,000,000,000,000 | 15 | fixed #2061 |
template<typename t>
CImg(const CImg<t>& img, const char *const dimensions):
_width(0),_height(0),_depth(0),_spectrum(0),_is_shared(false),_data(0) {
assign(img,dimensions); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 27,593,477,206,298,330,000,000,000,000,000,000,000 | 4 | Fix other issues in 'CImg<T>::load_bmp()'. |
struct drm_property *drm_property_create(struct drm_device *dev, int flags,
const char *name, int num_values)
{
struct drm_property *property = NULL;
property = kzalloc(sizeof(struct drm_property), GFP_KERNEL);
if (!property)
return NULL;
if (num_values) {
property->values = kzalloc(sizeof(uint64_t)*num... | 0 | [
"CWE-190",
"CWE-189"
] | linux | a5cd335165e31db9dbab636fd29895d41da55dd2 | 81,778,955,282,753,630,000,000,000,000,000,000,000 | 31 | drm: integer overflow in drm_mode_dirtyfb_ioctl()
There is a potential integer overflow in drm_mode_dirtyfb_ioctl()
if userspace passes in a large num_clips. The call to kmalloc would
allocate a small buffer, and the call to fb->funcs->dirty may result
in a memory corruption.
Reported-by: Haogang Chen <haogangchen@g... |
qf_jump_newwin(qf_info_T *qi,
int dir,
int errornr,
int forceit,
int newwin)
{
qf_list_T *qfl;
qfline_T *qf_ptr;
qfline_T *old_qf_ptr;
int qf_index;
int old_qf_index;
char_u *old_swb = p_swb;
unsigned old_swb_flags = swb_flags;
int prev_winid;
int opened_window =... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 301,214,580,266,163,170,000,000,000,000,000,000,000 | 103 | patch 9.0.0322: crash when no errors and 'quickfixtextfunc' is set
Problem: Crash when no errors and 'quickfixtextfunc' is set.
Solution: Do not handle errors if there aren't any. |
static void tcp_v4_reqsk_destructor(struct request_sock *req)
{
kfree(inet_rsk(req)->opt);
} | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 52,287,946,378,876,780,000,000,000,000,000,000,000 | 4 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
void Conv(const float* input_data, const Dims<4>& input_dims,
const float* filter_data, const Dims<4>& filter_dims,
const float* bias_data, const Dims<4>& bias_dims, int stride_width,
int stride_height, int pad_width, int pad_height, float* output_data,
const Dims<4>& output_dims... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 224,455,076,141,287,380,000,000,000,000,000,000,000 | 13 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
//! Convert pixel values from HSL to RGB color spaces.
CImg<T>& HSLtoRGB() {
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"HSLtoRGB(): Instance is not a HSL image.",
cimg_instance);
T *p1 = data(0,0,0,0)... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 209,720,032,790,825,770,000,000,000,000,000,000,000 | 32 | . |
static smart_ptr<DFA> ast_to_dfa(const spec_t &spec, Output &output)
{
OutputBlock &block = output.block();
const opt_t *opts = block.opts;
const loc_t &loc = block.loc;
Msg &msg = output.msg;
const std::vector<ASTRule> &rules = spec.rules;
const std::string
&cond = spec.name,
na... | 1 | [
"CWE-787"
] | re2c | a3473fd7be829cb33907cb08612f955133c70a96 | 160,782,611,265,893,400,000,000,000,000,000,000,000 | 73 | Limit maximum allowed NFA and DFA size.
Instead of failing with an out of memory exception or crashing with a
stack overflow, emit an error message and exit. This is a partial fix
for bug #394 "Stack overflow due to recursion in src/dfa/dead_rules.cc",
where re2c hit stack overflow on a counted repetition regexp with ... |
static ContributionInfo **AcquireContributionThreadSet(const size_t count)
{
register ssize_t
i;
ContributionInfo
**contribution;
size_t
number_threads;
number_threads=(size_t) GetMagickResourceLimit(ThreadResource);
contribution=(ContributionInfo **) AcquireQuantumMemory(number_threads,
si... | 0 | [
"CWE-369"
] | ImageMagick | 43539e67a47d2f8de832d33a5b26dc2a7a12294f | 323,298,062,460,598,100,000,000,000,000,000,000,000 | 26 | https://github.com/ImageMagick/ImageMagick/issues/1718 |
AudioOutputSpeech::~AudioOutputSpeech() {
#ifdef USE_OPUS
if (opusState)
opus_decoder_destroy(opusState);
#endif
if (cdDecoder) {
cCodec->celt_decoder_destroy(cdDecoder);
} else if (dsSpeex) {
speex_bits_destroy(&sbBits);
speex_decoder_destroy(dsSpeex);
}
if (srs)
speex_resampler_destroy(srs);
jitter_... | 0 | [
"CWE-119"
] | mumble | 850649234d11685145193a59d72d98429e4f9ba7 | 7,760,999,205,480,471,000,000,000,000,000,000,000 | 21 | mumble: fix Mumble-SA-2014-001 (CVE-2014-0044). |
static int kvm_vm_ioctl_enable_cap_generic(struct kvm *kvm,
struct kvm_enable_cap *cap)
{
switch (cap->cap) {
#ifdef CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT
case KVM_CAP_MANUAL_DIRTY_LOG_PROTECT:
if (cap->flags || (cap->args[0] & ~1))
return -EINVAL;
kvm->manual_dirty_log_protect = cap->args[0];
ret... | 0 | [
"CWE-416",
"CWE-362"
] | linux | cfa39381173d5f969daf43582c95ad679189cbc9 | 238,812,311,457,460,030,000,000,000,000,000,000,000 | 15 | kvm: fix kvm_ioctl_create_device() reference counting (CVE-2019-6974)
kvm_ioctl_create_device() does the following:
1. creates a device that holds a reference to the VM object (with a borrowed
reference, the VM's refcount has not been bumped yet)
2. initializes the device
3. transfers the reference to the device t... |
MagickExport void *AcquireMagickMemory(const size_t size)
{
register void
*memory;
#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
memory=memory_methods.acquire_memory_handler(size == 0 ? 1UL : size);
#else
if (memory_semaphore == (SemaphoreInfo *) NULL)
ActivateSemaphoreInfo(&memory_semaphore);
if... | 0 | [
"CWE-190",
"CWE-189",
"CWE-703"
] | ImageMagick | 0f6fc2d5bf8f500820c3dbcf0d23ee14f2d9f734 | 326,346,228,526,964,640,000,000,000,000,000,000,000 | 45 | |
sctp_disposition_t sctp_sf_do_9_2_prm_shutdown(
const struct sctp_endpoint *ep,
const struct sctp_association *asoc,
const sctp_subtype_t type,
void *arg,
sctp_cmd_seq_t *commands)
{
int disposition;
/* From 9.2 Shutdown of an Association
* Upon receipt of the SHUTDOWN primitive from its upper
* layer, the ... | 0 | [
"CWE-20"
] | linux-2.6 | ba0166708ef4da7eeb61dd92bbba4d5a749d6561 | 143,824,810,113,462,740,000,000,000,000,000,000,000 | 34 | sctp: Fix kernel panic while process protocol violation parameter
Since call to function sctp_sf_abort_violation() need paramter 'arg' with
'struct sctp_chunk' type, it will read the chunk type and chunk length from
the chunk_hdr member of chunk. But call to sctp_sf_violation_paramlen()
always with 'struct sctp_paramh... |
static int netlbl_cipsov4_list(struct sk_buff *skb, struct genl_info *info)
{
int ret_val;
struct sk_buff *ans_skb = NULL;
u32 nlsze_mult = 1;
void *data;
u32 doi;
struct nlattr *nla_a;
struct nlattr *nla_b;
struct cipso_v4_doi *doi_def;
u32 iter;
if (!info->attrs[NLBL_CIPSOV4_A_DOI]) {
ret_val = -EINVAL;
... | 0 | [
"CWE-416"
] | linux | ad5d07f4a9cd671233ae20983848874731102c08 | 216,811,353,279,067,300,000,000,000,000,000,000,000 | 152 | cipso,calipso: resolve a number of problems with the DOI refcounts
The current CIPSO and CALIPSO refcounting scheme for the DOI
definitions is a bit flawed in that we:
1. Don't correctly match gets/puts in netlbl_cipsov4_list().
2. Decrement the refcount on each attempt to remove the DOI from the
DOI list, only re... |
static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
{
struct rtattr **tca = arg;
u32 pid = skb ? NETLINK_CB(skb).pid : 0;
int ret = 0, ovr = 0;
if (tca[TCA_ACT_TAB-1] == NULL) {
printk("tc_ctl_action: received NO action attribs\n");
return -EINVAL;
}
/* n->nlmsg_flags&NLM_F_CREATE
... | 0 | [
"CWE-200"
] | linux-2.6 | 9ef1d4c7c7aca1cd436612b6ca785b726ffb8ed8 | 232,398,225,250,576,280,000,000,000,000,000,000,000 | 40 | [NETLINK]: Missing initializations in dumped data
Mostly missing initialization of padding fields of 1 or 2 bytes length,
two instances of uninitialized nlmsgerr->msg of 16 bytes length.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
static int omninet_write_room(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
struct usb_serial *serial = port->serial;
struct usb_serial_port *wport = serial->port[1];
int room = 0; /* Default: no room */
if (test_bit(0, &wport->write_urbs_free))
room = wport->bulk_out_size - OMN... | 0 | [
"CWE-399",
"CWE-404"
] | linux | 30572418b445d85fcfe6c8fe84c947d2606767d8 | 157,093,887,358,928,100,000,000,000,000,000,000,000 | 15 | USB: serial: omninet: fix reference leaks at open
This driver needlessly took another reference to the tty on open, a
reference which was then never released on close. This lead to not just
a leak of the tty, but also a driver reference leak that prevented the
driver from being unloaded after a port had once been open... |
void Item_func_div::result_precision()
{
/*
We need to add args[1]->divisor_precision_increment(),
to properly handle the cases like this:
SELECT 5.05 / 0.014; -> 360.714286
i.e. when the divisor has a zero integer part
and non-zero digits appear only after the decimal point.
Precision in th... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 81,937,758,595,516,700,000,000,000,000,000,000,000 | 27 | 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... |
static ssize_t copy_msghdr_from_user(struct msghdr *kmsg,
struct user_msghdr __user *umsg,
struct sockaddr __user **save_addr,
struct iovec **iov)
{
struct sockaddr __user *uaddr;
struct iovec __user *uiov;
size_t nr_segs;
ssize_t err;
if (!access_ok(VERIFY_READ, umsg, sizeof(*umsg)) ||... | 0 | [
"CWE-264"
] | net | 4de930efc23b92ddf88ce91c405ee645fe6e27ea | 274,398,456,330,372,140,000,000,000,000,000,000,000 | 55 | net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom
Cc: stable@vger.kernel.org # v3.19
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net> |
void setLocalComplete() { state_.local_complete_ = true; } | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 261,208,418,609,940,380,000,000,000,000,000,000,000 | 1 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
const Cluster* Segment::GetNext(const Cluster* pCurr) {
assert(pCurr);
assert(pCurr != &m_eos);
assert(m_clusters);
long idx = pCurr->m_index;
if (idx >= 0) {
assert(m_clusterCount > 0);
assert(idx < m_clusterCount);
assert(pCurr == m_clusters[idx]);
++idx;
if (idx >= m_clusterCount)
... | 0 | [
"CWE-20"
] | libvpx | 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 | 277,301,754,798,062,640,000,000,000,000,000,000,000 | 172 | update libwebm to libwebm-1.0.0.27-358-gdbf1d10
changelog:
https://chromium.googlesource.com/webm/libwebm/+log/libwebm-1.0.0.27-351-g9f23fbc..libwebm-1.0.0.27-358-gdbf1d10
Change-Id: I28a6b3ae02a53fb1f2029eee11e9449afb94c8e3 |
static void hso_kick_transmit(struct hso_serial *serial)
{
unsigned long flags;
int res;
spin_lock_irqsave(&serial->serial_lock, flags);
if (!serial->tx_buffer_count)
goto out;
if (serial->tx_urb_used)
goto out;
/* Wakeup USB interface if necessary */
if (hso_get_activity(serial->parent) == -EAGAIN)
got... | 0 | [
"CWE-125"
] | linux | 5146f95df782b0ac61abde36567e718692725c89 | 119,784,430,244,864,980,000,000,000,000,000,000,000 | 30 | USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data
The function hso_probe reads if_num from the USB device (as an u8) and uses
it without a length check to index an array, resulting in an OOB memory read
in hso_probe or hso_get_config_data.
Add a length check for both locations and updated hso_probe to ... |
static int check_return_code(struct bpf_verifier_env *env)
{
struct bpf_reg_state *reg;
struct tnum range = tnum_range(0, 1);
switch (env->prog->type) {
case BPF_PROG_TYPE_CGROUP_SKB:
case BPF_PROG_TYPE_CGROUP_SOCK:
case BPF_PROG_TYPE_CGROUP_SOCK_ADDR:
case BPF_PROG_TYPE_SOCK_OPS:
case BPF_PROG_TYPE_CGROUP_DEV... | 0 | [
"CWE-125"
] | linux | b799207e1e1816b09e7a5920fbb2d5fcf6edd681 | 146,684,060,880,415,830,000,000,000,000,000,000,000 | 38 | bpf: 32-bit RSH verification must truncate input before the ALU op
When I wrote commit 468f6eafa6c4 ("bpf: fix 32-bit ALU op verification"), I
assumed that, in order to emulate 64-bit arithmetic with 32-bit logic, it
is sufficient to just truncate the output to 32 bits; and so I just moved
the register size coercion t... |
int slirp_listen_wrap(int sockfd, int backlog)
{
int ret;
ret = listen(sockfd, backlog);
if (ret < 0) {
errno = socket_error();
}
return ret;
} | 0 | [
"CWE-120"
] | libslirp | 30648c03b27fb8d9611b723184216cd3174b6775 | 65,080,781,545,302,490,000,000,000,000,000,000,000 | 9 | util: add slirp_fmt() helpers
Various calls to snprintf() in libslirp assume that snprintf() returns
"only" the number of bytes written (excluding terminating NUL).
https://pubs.opengroup.org/onlinepubs/9699919799/functions/snprintf.html#tag_16_159_04
"Upon successful completion, the snprintf() function shall return... |
TEST_F(RouterTest, HashPolicyNoHash) {
ON_CALL(callbacks_.route_->route_entry_, hashPolicy())
.WillByDefault(Return(&callbacks_.route_->route_entry_.hash_policy_));
EXPECT_CALL(callbacks_.route_->route_entry_.hash_policy_, generateHash(_, _, _, _))
.WillOnce(Return(absl::optional<uint64_t>()));
EXPECT... | 0 | [
"CWE-703"
] | envoy | 18871dbfb168d3512a10c78dd267ff7c03f564c6 | 266,295,894,093,473,460,000,000,000,000,000,000,000 | 27 | [1.18] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
static void pegasus_disconnect(struct usb_interface *intf)
{
struct pegasus *pegasus = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
if (!pegasus) {
dev_dbg(&intf->dev, "unregistering non-bound device?\n");
return;
}
pegasus->flags |= PEGASUS_UNPLUG;
cancel_delayed_work(&pegasus->carrier_check);
un... | 0 | [
"CWE-119",
"CWE-284"
] | linux | 5593523f968bc86d42a035c6df47d5e0979b5ace | 227,621,694,262,250,000,000,000,000,000,000,000,000 | 22 | pegasus: 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")
References: https://bugs.debian.org/852556
Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@... |
static void rfc2231_list_insert (struct rfc2231_parameter **list,
struct rfc2231_parameter *par)
{
struct rfc2231_parameter **last = list;
struct rfc2231_parameter *p = *list;
int c;
while (p)
{
c = strcmp (par->attribute, p->attribute);
if ((c < 0) || (c == 0 && par->index <= p->index))
b... | 0 | [] | mutt | 3b6f6b829718ec8a7cf3eb6997d86e83e6c38567 | 43,994,223,424,616,730,000,000,000,000,000,000,000 | 20 | Avoid undefined behavior on huge integer in a RFC 2231 header.
The atoi() function was called on the index, which can potentially
be huge in an invalid message and can yield undefined behavior. The
mutt_atoi() function is now used for error detection. |
static void rtps_util_add_type_library(proto_tree *tree, packet_info * pinfo,
tvbuff_t * tvb, gint offset, const guint encoding, guint32 size) {
proto_tree * library_tree;
guint32 long_number, i;
long_number = tvb_get_guint32(tvb, offset, encoding);
library_tree = proto_tree_add_subtree_format(tree, tvb... | 0 | [
"CWE-401"
] | wireshark | 33e63d19e5496c151bad69f65cdbc7cba2b4c211 | 239,471,193,814,822,840,000,000,000,000,000,000,000 | 13 | RTPS: Fixup our coherent set map.
coherent_set_tracking.coherent_set_registry_map uses a struct as a key,
but the hash and comparison routines treat keys as a sequence of bytes.
Make sure every key byte is initialized. Fixes #16994.
Call wmem_strong_hash on our key in coherent_set_key_hash_by_key instead
of creating ... |
int LZ4_decompress_fast_withPrefix64k(const char* source, char* dest, int originalSize)
{
return LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, withPrefix64k, NULL, 64 KB);
} | 0 | [
"CWE-20"
] | lz4 | da5373197e84ee49d75b8334d4510689731d6e90 | 213,042,163,524,247,620,000,000,000,000,000,000,000 | 4 | Fixed : issue 52 (reported by Ludwig Strigeus) |
static void DrawPathCurveTo(DrawingWand *wand,const PathMode mode,
const double x1,const double y1,const double x2,const double y2,
const double x,const double y)
{
assert(wand != (DrawingWand *) NULL);
assert(wand->signature == MagickWandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(W... | 0 | [
"CWE-476"
] | ImageMagick | 6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9 | 71,206,614,725,695,900,000,000,000,000,000,000,000 | 20 | https://github.com/ImageMagick/ImageMagick/issues/716 |
del_sig(dns_db_t *db, dns_dbversion_t *version, dns_name_t *name,
dns_dbnode_t *node, unsigned int nkeys, dns_secalg_t algorithm,
uint16_t keyid, bool *has_algp, dns_diff_t *diff)
{
dns_rdata_rrsig_t rrsig;
dns_rdataset_t rdataset;
dns_rdatasetiter_t *iterator = NULL;
isc_result_t result;
bool alg_missed = false... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 118,407,175,088,263,700,000,000,000,000,000,000,000 | 94 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
MemoryRegion *get_system_memory(void)
{
return system_memory;
} | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 217,505,329,454,972,400,000,000,000,000,000,000,000 | 4 | exec: Respect as_tranlsate_internal length clamp
address_space_translate_internal will clamp the *plen length argument
based on the size of the memory region being queried. The iommu walker
logic in addresss_space_translate was ignoring this by discarding the
post fn call value of *plen. Fix by just always using *plen... |
pkcs11dsa_todns(const dst_key_t *key, isc_buffer_t *data) {
pk11_object_t *dsa;
CK_ATTRIBUTE *attr;
isc_region_t r;
int dnslen;
unsigned int t, p_bytes;
CK_ATTRIBUTE *prime = NULL, *subprime = NULL;
CK_ATTRIBUTE *base = NULL, *pub_key = NULL;
CK_BYTE *cp;
REQUIRE(key->keydata.pkey != NULL);
dsa = key->keyda... | 0 | [
"CWE-617"
] | bind9 | 8d807cc21655eaa6e6a08afafeec3682c0f3f2ab | 304,908,563,033,992,170,000,000,000,000,000,000,000 | 70 | Fix crash in pk11_numbits() when native-pkcs11 is used
When pk11_numbits() is passed a user provided input that contains all
zeroes (via crafted DNS message), it would crash with assertion
failure. Fix that by properly handling such input. |
TfLiteRegistration* Register_MAX_POOL_2D() {
return Register_MAX_POOL_GENERIC_OPT();
} | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 25,256,782,572,092,426,000,000,000,000,000,000,000 | 3 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
HttpTransact::delete_server_rr_entry(State* s, int max_retries)
{
char addrbuf[INET6_ADDRSTRLEN];
DebugTxn("http_trans", "[%d] failed to connect to %s", s->current.attempts,
ats_ip_ntop(&s->current.server->addr.sa, addrbuf, sizeof(addrbuf)));
DebugTxn("http_trans", "[delete_server_rr_entry] marking rr en... | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 14,761,605,575,674,242,000,000,000,000,000,000,000 | 15 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
void EvalQuantized(TfLiteContext* context,
const TfLiteTransposeConvParams* params, OpData* data,
const TfLiteTensor* input, const TfLiteTensor* weights,
const TfLiteTensor* transposed_weights,
const TfLiteTensor* bias, TfLiteTensor* col2im,
... | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 98,225,860,341,659,870,000,000,000,000,000,000,000 | 50 | [tflite]: Insert `nullptr` checks when obtaining tensors.
As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages.
We also insert `nullptr` checks on usages o... |
static int ftrace_startup(struct ftrace_ops *ops, int command)
{
bool hash_enable = true;
if (unlikely(ftrace_disabled))
return -ENODEV;
ftrace_start_up++;
command |= FTRACE_UPDATE_CALLS;
/* ops marked global share the filter hashes */
if (ops->flags & FTRACE_OPS_FL_GLOBAL) {
ops = &global_ops;
/* Don't ... | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 187,991,047,518,334,330,000,000,000,000,000,000,000 | 27 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
sha256_digest(const unsigned char *input, size_t length, unsigned char *output)
{
return openssl_dig(EVP_sha256(), input, length, output);
} | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 96,284,981,472,556,500,000,000,000,000,000,000,000 | 4 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
KeyAbort(SIGNAL_ARG)
{
LONGJMP(AbortLoading, 1);
SIGNAL_RETURN;
} | 0 | [
"CWE-476"
] | w3m | 59b91cd8e30c86f23476fa81ae005cabff49ebb6 | 321,923,305,846,372,600,000,000,000,000,000,000,000 | 5 | Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7 |
static void setautobright(struct gspca_dev *gspca_dev, s32 val)
{
struct sd *sd = (struct sd *) gspca_dev;
i2c_w_mask(sd, 0x2d, val ? 0x10 : 0x00, 0x10);
} | 0 | [
"CWE-476"
] | linux | 998912346c0da53a6dbb71fab3a138586b596b30 | 32,588,184,215,509,187,000,000,000,000,000,000,000 | 6 | media: ov519: add missing endpoint sanity checks
Make sure to check that we have at least one endpoint before accessing
the endpoint array to avoid dereferencing a NULL-pointer on stream
start.
Note that these sanity checks are not redundant as the driver is mixing
looking up altsettings by index and by number, which... |
void ProtocolV1::fault() {
ldout(cct, 20) << __func__ << dendl;
if (state == CLOSED || state == NONE) {
ldout(cct, 10) << __func__ << " connection is already closed" << dendl;
return;
}
if (connection->policy.lossy && state != START_CONNECT &&
state != CONNECTING) {
ldout(cct, 1) << __func__... | 0 | [
"CWE-294"
] | ceph | 6c14c2fb5650426285428dfe6ca1597e5ea1d07d | 306,136,643,474,960,750,000,000,000,000,000,000,000 | 86 | 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... |
int putsgent_sane(const struct sgrp *sg, FILE *stream) {
assert(sg);
assert(stream);
errno = 0;
if (putsgent(sg, stream) != 0)
return errno_or_else(EIO);
return 0;
} | 0 | [
"CWE-269"
] | systemd | 156a5fd297b61bce31630d7a52c15614bf784843 | 132,833,981,917,648,640,000,000,000,000,000,000,000 | 10 | basic/user-util: always use base 10 for user/group numbers
We would parse numbers with base prefixes as user identifiers. For example,
"0x2b3bfa0" would be interpreted as UID==45334432 and "01750" would be
interpreted as UID==1000. This parsing was used also in cases where either a
user/group name or number may be spe... |
__ipmi_fru_print(struct ipmi_intf * intf, uint8_t id)
{
struct ipmi_rs * rsp;
struct ipmi_rq req;
struct fru_info fru;
struct fru_header header;
uint8_t msg_data[4];
memset(&fru, 0, sizeof(struct fru_info));
memset(&header, 0, sizeof(struct fru_header));
/*
* get info about this FRU
*/
memset(msg_data, 0, ... | 0 | [
"CWE-120",
"CWE-787"
] | ipmitool | e824c23316ae50beb7f7488f2055ac65e8b341f2 | 172,380,673,069,916,450,000,000,000,000,000,000,000 | 125 | fru: Fix buffer overflow vulnerabilities
Partial fix for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
The `read_fru_area_section` function only performs size validation of
requested read size, and falsely assumes that the IPMI message will not
respond with more than ... |
void CLASS unpacked_load_raw_FujiDBP()
/*
for Fuji DBP for GX680, aka DX-2000
DBP_tile_width = 688;
DBP_tile_height = 3856;
DBP_n_tiles = 8;
*/
{
int scan_line, tile_n;
int nTiles;
nTiles = 8;
tile_width = raw_width / nTiles;
ushort *tile;
tile = (ushort *)calloc(raw_height, tile_width * 2);
for ... | 0 | [
"CWE-400"
] | LibRaw | e67a9862d10ebaa97712f532eca1eb5e2e410a22 | 38,467,227,009,733,200,000,000,000,000,000,000,000 | 28 | 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 |
static bool ftrace_hash_empty(struct ftrace_hash *hash)
{
return !hash || !hash->count;
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 174,601,115,114,269,300,000,000,000,000,000,000,000 | 4 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.