func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
dnp3_al_process_object(tvbuff_t *tvb, packet_info *pinfo, int offset,
proto_tree *robj_tree, gboolean header_only,
guint16 *al_objtype, nstime_t *al_cto)
{
guint8 al_objq, al_objq_prefix, al_objq_range, al_oct_len = 0, bitindex;
guint16 al_obj, temp;
guint32... | 0 | [
"CWE-835"
] | wireshark | 618661b22e34a59b21117db723d8ff91e064d4ba | 166,107,750,976,274,360,000,000,000,000,000,000,000 | 1,249 | dnp: plug a memory leak.
If we're throwing away the data, *throw away the data* - free it, as
we're not using it as the backing data for a tvbuff. |
int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length)
{
struct super_block *sb = inode->i_sb;
ext4_lblk_t first_block, stop_block;
struct address_space *mapping = inode->i_mapping;
loff_t first_block_offset, last_block_offset;
handle_t *handle;
unsigned int credits;
int ret = 0;
if (!S_ISREG(i... | 0 | [] | linux | 8e4b5eae5decd9dfe5a4ee369c22028f90ab4c44 | 22,050,165,216,352,595,000,000,000,000,000,000,000 | 131 | ext4: fail ext4_iget for root directory if unallocated
If the root directory has an i_links_count of zero, then when the file
system is mounted, then when ext4_fill_super() notices the problem and
tries to call iput() the root directory in the error return path,
ext4_evict_inode() will try to free the inode on disk, b... |
cdataBlockDebug(void *ctx ATTRIBUTE_UNUSED, const xmlChar *value, int len)
{
callbacks++;
if (quiet)
return;
fprintf(SAXdebug, "SAX.pcdata(%.20s, %d)\n",
(char *) value, len);
} | 0 | [
"CWE-125"
] | libxml2 | a820dbeac29d330bae4be05d9ecd939ad6b4aa33 | 114,596,024,469,954,750,000,000,000,000,000,000,000 | 8 | Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605>
Reviewed by David Kilzer.
* HTMLparser.c:
(htmlParseName): Add bounds check.
(htmlParseNameComplex): Ditto.
* result/HTML/758605.html: Added.
* result/HTML/758605.html.err: Added.
* result/HTML/758605.html.s... |
void vhost_vsock_common_unrealize(VirtIODevice *vdev)
{
VHostVSockCommon *vvc = VHOST_VSOCK_COMMON(vdev);
vhost_vsock_common_post_load_timer_cleanup(vvc);
virtio_delete_queue(vvc->recv_vq);
virtio_delete_queue(vvc->trans_vq);
virtio_delete_queue(vvc->event_vq);
virtio_cleanup(vdev);
} | 0 | [
"CWE-772"
] | qemu | 8d1b247f3748ac4078524130c6d7ae42b6140aaf | 49,031,463,198,074,380,000,000,000,000,000,000,000 | 11 | vhost-vsock: detach the virqueue element in case of error
In vhost_vsock_common_send_transport_reset(), if an element popped from
the virtqueue is invalid, we should call virtqueue_detach_element() to
detach it from the virtqueue before freeing its memory.
Fixes: fc0b9b0e1c ("vhost-vsock: add virtio sockets device")
... |
int lzxd_decompress(struct lzxd_stream *lzx, off_t out_bytes) {
/* bitstream and huffman reading variables */
register unsigned int bit_buffer;
register int bits_left, i=0;
unsigned char *i_ptr, *i_end;
register unsigned short sym;
int match_length, length_footer, extra, verbatim_bits, bytes_todo;
int th... | 0 | [
"CWE-119",
"CWE-787"
] | clamav-devel | a83773682e856ad6529ba6db8d1792e6d515d7f1 | 54,831,592,204,818,270,000,000,000,000,000,000,000 | 503 | fixing potential OOB window write when unpacking chm files |
static int writeState(const char *stateFilename)
{
struct logState *p;
FILE *f;
char *chptr;
unsigned int i = 0;
int error = 0;
int bytes = 0;
int fdcurr;
int fdsave;
struct stat sb;
char *tmpFilename = NULL;
struct tm now;
time_t now_time, last_time;
char *prevCtx;
... | 1 | [
"CWE-732"
] | logrotate | f46d0bdfc9c53515c13880c501f4d2e1e7dd8b25 | 79,508,838,414,487,710,000,000,000,000,000,000,000 | 224 | Lock state file to prevent parallel execution
Running multiple instances of logrotate on the same set of log-files
might have undesirable effects.
Add command line option --skip-state-lock to skip locking the state
file, for example if locking is unsupported or prohibited.
Fixes: https://github.com/logrotate/logrota... |
u32 gf_hinter_track_get_bandwidth(GF_RTPHinter *tkHinter)
{
return tkHinter->bandwidth;
} | 0 | [
"CWE-476"
] | gpac | ebfa346eff05049718f7b80041093b4c5581c24e | 174,869,086,527,827,880,000,000,000,000,000,000,000 | 4 | fixed #1706 |
static void handle_irq_transmit_status(struct b43_wldev *dev)
{
u32 v0, v1;
u16 tmp;
struct b43_txstatus stat;
while (1) {
v0 = b43_read32(dev, B43_MMIO_XMITSTAT_0);
if (!(v0 & 0x00000001))
break;
v1 = b43_read32(dev, B43_MMIO_XMITSTAT_1);
stat.cookie = (v0 >> 16);
stat.seq = (v1 & 0x0000FFFF);
sta... | 0 | [
"CWE-134"
] | wireless | 9538cbaab6e8b8046039b4b2eb6c9d614dc782bd | 68,876,086,175,089,650,000,000,000,000,000,000,000 | 27 | b43: stop format string leaking into error msgs
The module parameter "fwpostfix" is userspace controllable, unfiltered,
and is used to define the firmware filename. b43_do_request_fw() populates
ctx->errors[] on error, containing the firmware filename. b43err()
parses its arguments as a format string. For systems with... |
server_client_redraw_timer(__unused int fd, __unused short events,
__unused void* data)
{
log_debug("redraw timer fired");
} | 0 | [] | src | b32e1d34e10a0da806823f57f02a4ae6e93d756e | 25,461,716,047,355,790,000,000,000,000,000,000,000 | 5 | evbuffer_new and bufferevent_new can both fail (when malloc fails) and
return NULL. GitHub issue 1547. |
RZ_API bool rz_core_analysis_function_add(RzCore *core, const char *name, ut64 addr, bool analyze_recursively) {
int depth = rz_config_get_i(core->config, "analysis.depth");
RzAnalysisFunction *fcn = NULL;
//rz_core_analysis_undefine (core, core->offset);
rz_core_analysis_fcn(core, addr, UT64_MAX, RZ_ANALYSIS_REF_... | 0 | [
"CWE-703"
] | rizin | 6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939 | 198,475,503,702,421,640,000,000,000,000,000,000,000 | 88 | Initialize retctx,ctx before freeing the inner elements
In rz_core_analysis_type_match retctx structure was initialized on the
stack only after a "goto out_function", where a field of that structure
was freed. When the goto path is taken, the field is not properly
initialized and it cause cause a crash of Rizin or hav... |
int tipc_nl_node_set_key(struct sk_buff *skb, struct genl_info *info)
{
int err;
rtnl_lock();
err = __tipc_nl_node_set_key(skb, info);
rtnl_unlock();
return err;
} | 0 | [] | linux | 0217ed2848e8538bcf9172d97ed2eeb4a26041bb | 152,830,576,302,131,190,000,000,000,000,000,000,000 | 10 | tipc: better validate user input in tipc_nl_retrieve_key()
Before calling tipc_aead_key_size(ptr), we need to ensure
we have enough data to dereference ptr->keylen.
We probably also want to make sure tipc_aead_key_size()
wont overflow with malicious ptr->keylen values.
Syzbot reported:
BUG: KMSAN: uninit-value in _... |
qf_new_list(qf_info_T *qi, char_u *qf_title)
{
int i;
qf_list_T *qfl;
// If the current entry is not the last entry, delete entries beyond
// the current entry. This makes it possible to browse in a tree-like
// way with ":grep".
while (qi->qf_listcount > qi->qf_curlist + 1)
qf_free(&qi->qf_... | 0 | [
"CWE-416"
] | vim | 4f1b083be43f351bc107541e7b0c9655a5d2c0bb | 93,732,360,710,220,830,000,000,000,000,000,000,000 | 28 | 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. |
qtdemux_sub_caps (GstQTDemux * qtdemux, QtDemuxStream * stream,
guint32 fourcc, const guint8 * stsd_data, gchar ** codec_name)
{
GstCaps *caps;
GST_DEBUG_OBJECT (qtdemux, "resolve fourcc 0x%08x", GUINT32_TO_BE (fourcc));
switch (fourcc) {
case FOURCC_mp4s:
_codec ("DVD subtitle");
caps = gst... | 0 | [
"CWE-125"
] | gst-plugins-good | d0949baf3dadea6021d54abef6802fed5a06af75 | 294,038,664,196,933,930,000,000,000,000,000,000,000 | 41 | qtdemux: Fix out of bounds read in tag parsing code
We can't simply assume that the length of the tag value as given
inside the stream is correct but should also check against the amount of
data we have actually available.
https://bugzilla.gnome.org/show_bug.cgi?id=775451 |
int input_device_close_channels(const bdaddr_t *src, const bdaddr_t *dst)
{
struct input_device *idev = find_device(src, dst);
if (!idev)
return -ENOENT;
if (idev->intr_io)
g_io_channel_shutdown(idev->intr_io, TRUE, NULL);
if (idev->ctrl_io)
g_io_channel_shutdown(idev->ctrl_io, TRUE, NULL);
return 0;
} | 0 | [] | bluez | 3cccdbab2324086588df4ccf5f892fb3ce1f1787 | 39,990,266,921,960,960,000,000,000,000,000,000,000 | 15 | HID accepts bonded device connections only.
This change adds a configuration for platforms to choose a more secure
posture for the HID profile. While some older mice are known to not
support pairing or encryption, some platform may choose a more secure
posture by requiring the device to be bonded and require the
con... |
void ConnectionManagerImpl::RdsRouteConfigUpdateRequester::requestRouteConfigUpdate(
Http::RouteConfigUpdatedCallbackSharedPtr route_config_updated_cb) {
absl::optional<Router::ConfigConstSharedPtr> route_config = parent_.routeConfig();
Event::Dispatcher& thread_local_dispatcher =
parent_.connection_manag... | 0 | [
"CWE-22"
] | envoy | 5333b928d8bcffa26ab19bf018369a835f697585 | 102,769,833,180,367,860,000,000,000,000,000,000,000 | 23 | Implement handling of escaped slash characters in URL path
Fixes: CVE-2021-29492
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void __exit dcbnl_exit(void)
{
rtnl_unregister(PF_UNSPEC, RTM_GETDCB);
rtnl_unregister(PF_UNSPEC, RTM_SETDCB);
dcb_flushapp();
} | 0 | [
"CWE-399"
] | linux-2.6 | 29cd8ae0e1a39e239a3a7b67da1986add1199fc0 | 308,822,704,752,258,400,000,000,000,000,000,000,000 | 6 | dcbnl: fix various netlink info leaks
The dcb netlink interface leaks stack memory in various places:
* perm_addr[] buffer is only filled at max with 12 of the 32 bytes but
copied completely,
* no in-kernel driver fills all fields of an IEEE 802.1Qaz subcommand,
so we're leaking up to 58 bytes for ieee_ets structs... |
static bool wmi_evt_call_handler(struct wil6210_priv *wil, int id,
void *d, int len)
{
uint i;
for (i = 0; i < ARRAY_SIZE(wmi_evt_handlers); i++) {
if (wmi_evt_handlers[i].eventid == id) {
wmi_evt_handlers[i].handler(wil, id, d, len);
return true;
}
}
return false;
} | 0 | [
"CWE-119"
] | linux | b5a8ffcae4103a9d823ea3aa3a761f65779fbe2a | 13,462,750,259,385,290,000,000,000,000,000,000,000 | 14 | wil6210: missing length check in wmi_set_ie
Add a length check in wmi_set_ie to detect unsigned integer
overflow.
Signed-off-by: Lior David <qca_liord@qca.qualcomm.com>
Signed-off-by: Maya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com> |
inline void Dequantize(const uint8* input_data, const Dims<4>& input_dims,
int32 zero_point, double scale, float* output_data,
const Dims<4>& output_dims) {
tflite::DequantizationParams op_params;
op_params.zero_point = zero_point;
op_params.scale = scale;
Dequanti... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 92,784,640,885,309,940,000,000,000,000,000,000,000 | 10 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
ptvcursor_add_ret_boolean(ptvcursor_t* ptvc, int hfindex, gint length, const guint encoding, gboolean *retval)
{
header_field_info *hfinfo;
field_info *new_fi;
gint item_length;
int offset;
guint64 value, bitval;
offset = ptvc->offset;
PROTO_REGISTRAR_GET_NTH(hfindex, hfinfo);
if (hfinfo->type != FT_B... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 10,014,818,893,719,261,000,000,000,000,000,000,000 | 53 | epan: Fix a memory leak.
Make sure _proto_tree_add_bits_ret_val allocates a bits array using the
packet scope, otherwise we leak memory. Fixes #17032. |
PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
const char **nextTokPtr) {
REQUIRE_CHAR(enc, ptr, end);
switch (BYTE_TYPE(enc, ptr)) {
CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
case BT_NUM:
return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
de... | 0 | [
"CWE-116"
] | libexpat | 3f0a0cb644438d4d8e3294cd0b1245d0edb0c6c6 | 11,381,288,077,992,290,000,000,000,000,000,000,000 | 24 | lib: Add missing validation of encoding (CVE-2022-25235) |
const std::string& get() const { return string_; } | 0 | [] | envoy | 2c60632d41555ec8b3d9ef5246242be637a2db0f | 53,687,360,009,698,100,000,000,000,000,000,000,000 | 1 | http: header map security fixes for duplicate headers (#197)
Previously header matching did not match on all headers for
non-inline headers. This patch changes the default behavior to
always logically match on all headers. Multiple individual
headers will be logically concatenated with ',' similar to what
is done with... |
int mingw_bind(int sockfd, struct sockaddr *sa, size_t sz)
{
SOCKET s = (SOCKET)_get_osfhandle(sockfd);
return bind(s, sa, sz);
} | 0 | [
"CWE-20"
] | git | 6d8684161ee9c03bed5cb69ae76dfdddb85a0003 | 2,915,118,030,023,096,000,000,000,000,000,000,000 | 5 | mingw: fix quoting of arguments
We need to be careful to follow proper quoting rules. For example, if an
argument contains spaces, we have to quote them. Double-quotes need to
be escaped. Backslashes need to be escaped, but only if they are
followed by a double-quote character.
We need to be _extra_ careful to consid... |
nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct nfsd4_fallocate *fallocate, int flags)
{
__be32 status = nfserr_notsupp;
struct file *file;
status = nfs4_preprocess_stateid_op(rqstp, cstate, &cstate->current_fh,
&fallocate->falloc_stateid,
WR_STATE, &file, NUL... | 0 | [
"CWE-20",
"CWE-129"
] | linux | b550a32e60a4941994b437a8d662432a486235a5 | 88,135,458,768,756,280,000,000,000,000,000,000,000 | 21 | nfsd: fix undefined behavior in nfsd4_layout_verify
UBSAN: Undefined behaviour in fs/nfsd/nfs4proc.c:1262:34
shift exponent 128 is too large for 32-bit type 'int'
Depending on compiler+architecture, this may cause the check for
layout_type to succeed for overly large values (which seems to be the
case with amd64)... |
static void hclge_tm_tc_info_init(struct hclge_dev *hdev)
{
u8 i;
for (i = 0; i < hdev->tm_info.num_tc; i++) {
hdev->tm_info.tc_info[i].tc_id = i;
hdev->tm_info.tc_info[i].tc_sch_mode = HCLGE_SCH_MODE_DWRR;
hdev->tm_info.tc_info[i].pgid = 0;
hdev->tm_info.tc_info[i].bw_limit =
hdev->tm_info.pg_info[0].bw_... | 0 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 148,407,545,077,561,100,000,000,000,000,000,000,000 | 24 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... |
TfLiteRegistration* Register_AVERAGE_POOL_2D() {
return Register_AVERAGE_POOL_GENERIC_OPT();
} | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 327,062,646,973,658,560,000,000,000,000,000,000,000 | 3 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
long long Long() const {
return chk(NumberLong)._numberLong();
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 6,723,068,563,770,021,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
struct mb2_cache *mb2_cache_create(int bucket_bits)
{
struct mb2_cache *cache;
int bucket_count = 1 << bucket_bits;
int i;
if (!try_module_get(THIS_MODULE))
return NULL;
cache = kzalloc(sizeof(struct mb2_cache), GFP_KERNEL);
if (!cache)
goto err_out;
cache->c_bucket_bits = bucket_bits;
INIT_LIST_HEAD(&cac... | 0 | [
"CWE-241",
"CWE-19"
] | linux | f9a61eb4e2471c56a63cd804c7474128138c38ac | 95,032,396,372,007,720,000,000,000,000,000,000,000 | 35 | mbcache2: reimplement mbcache
Original mbcache was designed to have more features than what ext?
filesystems ended up using. It supported entry being in more hashes, it
had a home-grown rwlocking of each entry, and one cache could cache
entries from multiple filesystems. This genericity also resulted in more
complex l... |
static void igmp_gq_timer_expire(struct timer_list *t)
{
struct in_device *in_dev = from_timer(in_dev, t, mr_gq_timer);
in_dev->mr_gq_running = 0;
igmpv3_send_report(in_dev, NULL);
in_dev_put(in_dev);
} | 0 | [
"CWE-362"
] | linux | 23d2b94043ca8835bd1e67749020e839f396a1c2 | 23,739,814,874,427,203,000,000,000,000,000,000,000 | 8 | igmp: Add ip_mc_list lock in ip_check_mc_rcu
I got below panic when doing fuzz test:
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 4056 Comm: syz-executor.3 Tainted: G B 5.14.0-rc1-00195-gcff5c4254439-dirty #2
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9... |
static inline unsigned tx_desc_get_used(uint32_t *desc)
{
return (desc[1] & DESC_1_USED) ? 1 : 0;
} | 0 | [
"CWE-835"
] | qemu | e73adfbeec9d4e008630c814759052ed945c3fed | 30,293,680,944,227,444,000,000,000,000,000,000,000 | 4 | cadence_gem: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Philippe Mathieu-Daudé <philmd@redha... |
int ssl3_send_certificate_request(SSL *s)
{
unsigned char *p,*d;
int i,j,nl,off,n;
STACK_OF(X509_NAME) *sk=NULL;
X509_NAME *name;
BUF_MEM *buf;
if (s->state == SSL3_ST_SW_CERT_REQ_A)
{
buf=s->init_buf;
d=p=(unsigned char *)&(buf->data[4]);
/* get the list of acceptable cert types */
p++;
n=ssl3_ge... | 0 | [
"CWE-326",
"CWE-310"
] | openssl | bc8923b1ec9c467755cd86f7848c50ee8812e441 | 170,051,769,753,434,070,000,000,000,000,000,000,000 | 101 | Fix for CVE-2014-0224
Only accept change cipher spec when it is expected instead of at any
time. This prevents premature setting of session keys before the master
secret is determined which an attacker could use as a MITM attack.
Thanks to KIKUCHI Masashi (Lepidum Co. Ltd.) for reporting this issue
and providing the ... |
static int key_notify_policy_flush(const struct km_event *c)
{
struct sk_buff *skb_out;
struct sadb_msg *hdr;
skb_out = alloc_skb(sizeof(struct sadb_msg) + 16, GFP_ATOMIC);
if (!skb_out)
return -ENOBUFS;
hdr = (struct sadb_msg *) skb_put(skb_out, sizeof(struct sadb_msg));
hdr->sadb_msg_type = SADB_X_SPDFLUSH;
... | 0 | [
"CWE-20",
"CWE-269"
] | linux | f3d3342602f8bcbf37d7c46641cb9bca7618eb1c | 519,451,450,030,077,700,000,000,000,000,000,000 | 21 | net: rework recvmsg handler msg_name and msg_namelen logic
This patch now always passes msg->msg_namelen as 0. recvmsg handlers must
set msg_namelen to the proper size <= sizeof(struct sockaddr_storage)
to return msg_name to the user.
This prevents numerous uninitialized memory leaks we had in the
recvmsg handlers an... |
static struct client *imap_client_alloc(pool_t pool)
{
struct imap_client *imap_client;
imap_client = p_new(pool, struct imap_client, 1);
return &imap_client->common;
} | 0 | [] | core | 62061e8cf68f506c0ccaaba21fd4174764ca875f | 95,133,220,443,820,600,000,000,000,000,000,000,000 | 7 | imap-login: Split off client_invalid_command() |
Item_string(THD *thd, CHARSET_INFO *cs, Derivation dv= DERIVATION_COERCIBLE):
Item_literal(thd)
{
collation.set(cs, dv);
max_length= 0;
set_name(thd, NULL, 0, system_charset_info);
decimals= NOT_FIXED_DEC;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 160,017,405,220,895,620,000,000,000,000,000,000,000 | 8 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
static ssize_t sock_aio_write(struct kiocb *iocb, const struct iovec *iov,
unsigned long nr_segs, loff_t pos)
{
struct sock_iocb siocb, *x;
if (pos != 0)
return -ESPIPE;
x = alloc_sock_iocb(iocb, &siocb);
if (!x)
return -ENOMEM;
return do_sock_write(&x->async_msg, iocb, iocb->ki_filp, iov, nr_segs);
} | 0 | [] | linux-2.6 | 644595f89620ba8446cc555be336d24a34464950 | 150,021,628,161,995,200,000,000,000,000,000,000,000 | 14 | compat: Handle COMPAT_USE_64BIT_TIME in net/socket.c
Use helper functions aware of COMPAT_USE_64BIT_TIME to write struct
timeval and struct timespec to userspace in net/socket.c.
Signed-off-by: H. Peter Anvin <hpa@zytor.com> |
static void tg3_restore_pci_state(struct tg3 *tp)
{
u32 val;
/* Re-enable indirect register accesses. */
pci_write_config_dword(tp->pdev, TG3PCI_MISC_HOST_CTRL,
tp->misc_host_ctrl);
/* Set MAX PCI retry to zero. */
val = (PCISTATE_ROM_ENABLE | PCISTATE_ROM_RETRY_ENABLE);
if (tg3_chip_rev_id(tp) == CHI... | 0 | [
"CWE-476",
"CWE-119"
] | linux | 715230a44310a8cf66fbfb5a46f9a62a9b2de424 | 264,732,498,620,854,940,000,000,000,000,000,000,000 | 59 | tg3: fix length overflow in VPD firmware parsing
Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version
when present") introduced VPD parsing that contained a potential length
overflow.
Limit the hardware's reported firmware string length (max 255 bytes) to
stay inside the driver's firmware string ... |
GF_Err trex_Read(GF_Box *s, GF_BitStream *bs)
{
GF_TrackExtendsBox *ptr = (GF_TrackExtendsBox *)s;
ptr->trackID = gf_bs_read_u32(bs);
ptr->def_sample_desc_index = gf_bs_read_u32(bs);
ptr->def_sample_duration = gf_bs_read_u32(bs);
ptr->def_sample_size = gf_bs_read_u32(bs);
ptr->def_sample_flags = gf_bs_read_u32(... | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 241,158,491,490,086,170,000,000,000,000,000,000,000 | 11 | prevent dref memleak on invalid input (#1183) |
static bool vrend_compile_shader(struct vrend_sub_context *sub_ctx,
struct vrend_shader *shader)
{
GLint param;
const char *shader_parts[SHADER_MAX_STRINGS];
for (int i = 0; i < shader->glsl_strings.num_strings; i++)
shader_parts[i] = shader->glsl_strings.strings[i].buf;... | 0 | [
"CWE-787"
] | virglrenderer | 95e581fd181b213c2ed7cdc63f2abc03eaaa77ec | 332,597,532,393,035,450,000,000,000,000,000,000,000 | 25 | vrend: Add test to resource OOB write and fix it
v2: Also check that no depth != 1 has been send when none is due
Closes: #250
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com> |
tparm_trace_call(const char *string, TPARM_DATA * data)
{
if (USE_TRACEF(TRACE_CALLS)) {
int i;
for (i = 0; i < data->num_actual; i++) {
if (data->p_is_s[i] != 0) {
save_text(", %s", _nc_visbuf(data->p_is_s[i]), 0);
} else if ((long) data->param[i] > MAX_OF_TYPE(NCURSES_INT2) ||
(long) data->... | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 63,383,396,275,279,110,000,000,000,000,000,000,000 | 21 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
static GF_Err ctrn_box_read(GF_Box *s, GF_BitStream *bs)
{
u32 i, count, flags, first_idx=0;
Bool inherit_dur, inherit_size, inherit_flags, inherit_ctso;
GF_TrunEntry *ent;
GF_TrackFragmentRunBox *ptr = (GF_TrackFragmentRunBox *)s;
flags = ptr->flags;
ptr->ctrn_flags = flags;
ptr->flags = 0;
ptr->sample_count... | 0 | [
"CWE-787"
] | gpac | 388ecce75d05e11fc8496aa4857b91245007d26e | 274,973,344,597,961,960,000,000,000,000,000,000,000 | 116 | fixed #1587 |
int meth_get_head(struct transaction_t *txn, void *params)
{
struct meth_params *gparams = (struct meth_params *) params;
const char **hdr;
struct mime_type_t *mime = NULL;
int ret = 0, r = 0, precond, rights;
const char *data = NULL;
unsigned long datalen = 0, offset = 0;
struct buf msg_buf... | 0 | [] | cyrus-imapd | 6703ff881b6056e0c045a7b795ce8ba1bbb87027 | 329,481,916,417,848,940,000,000,000,000,000,000,000 | 188 | http_dav.c: add 'private' Cache-Control directive for cacheable responses that require authentication |
void show_ip(struct pt_regs *regs, const char *loglvl)
{
#ifdef CONFIG_X86_32
printk("%sEIP: %pS\n", loglvl, (void *)regs->ip);
#else
printk("%sRIP: %04x:%pS\n", loglvl, (int)regs->cs, (void *)regs->ip);
#endif
show_opcodes((u8 *)regs->ip, loglvl);
} | 1 | [
"CWE-20"
] | linux | 342db04ae71273322f0011384a9ed414df8bdae4 | 172,255,949,513,976,020,000,000,000,000,000,000,000 | 9 | x86/dumpstack: Don't dump kernel memory based on usermode RIP
show_opcodes() is used both for dumping kernel instructions and for dumping
user instructions. If userspace causes #PF by jumping to a kernel address,
show_opcodes() can be reached with regs->ip controlled by the user,
pointing to kernel code. Make sure th... |
static void __h2_deinit(void)
{
pool_destroy(pool_head_h2s);
pool_destroy(pool_head_h2c);
} | 0 | [
"CWE-119"
] | haproxy | 3f0e1ec70173593f4c2b3681b26c04a4ed5fc588 | 186,921,081,738,890,050,000,000,000,000,000,000,000 | 5 | BUG/CRITICAL: h2: fix incorrect frame length check
The incoming H2 frame length was checked against the max_frame_size
setting instead of being checked against the bufsize. The max_frame_size
only applies to outgoing traffic and not to incoming one, so if a large
enough frame size is advertised in the SETTINGS frame, ... |
static int php_snmp_write_exceptions_enabled(php_snmp_object *snmp_object, zval *newval)
{
zval ztmp;
int ret = SUCCESS;
if (Z_TYPE_P(newval) != IS_LONG) {
ZVAL_COPY(&ztmp, newval);
convert_to_long(&ztmp);
newval = &ztmp;
}
snmp_object->exceptions_enabled = Z_LVAL_P(newval);
if (newval == &ztmp) {
zval_... | 0 | [
"CWE-20"
] | php-src | 6e25966544fb1d2f3d7596e060ce9c9269bbdcf8 | 219,016,019,185,354,200,000,000,000,000,000,000,000 | 17 | Fixed bug #71704 php_snmp_error() Format String Vulnerability |
inline bool Wasm::copyToPointerSize(const Buffer::Instance& buffer, uint64_t start, uint64_t length,
uint64_t ptr_ptr, uint64_t size_ptr) {
uint64_t size = buffer.length();
if (size < start + length) {
return false;
}
auto nslices = buffer.getRawSlices(nullptr, 0);
auto... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 66,412,574,810,231,805,000,000,000,000,000,000,000 | 40 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
static void rtl8139_Config4_write(RTL8139State *s, uint32_t val)
{
val &= 0xff;
DPRINTF("Config4 write val=0x%02x\n", val);
if (!rtl8139_config_writable(s)) {
return;
}
/* mask unwritable bits */
val = SET_MASKED(val, 0x0a, s->Config4);
s->Config4 = val;
} | 0 | [
"CWE-835"
] | qemu | 5311fb805a4403bba024e83886fa0e7572265de4 | 30,157,420,120,158,804,000,000,000,000,000,000,000 | 15 | rtl8139: switch to use qemu_receive_packet() for loopback
This patch switches to use qemu_receive_packet() which can detect
reentrancy and return early.
This is intended to address CVE-2021-3416.
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: qemu-stable@nongnu.org
Buglink: https://bugs.launchpad.net/qemu/+bug/1910826... |
static int h264_decode_frame(AVCodecContext *avctx, void *data,
int *got_frame, AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size;
H264Context *h = avctx->priv_data;
AVFrame *pict = data;
int buf_index = 0;
int ret;
... | 1 | [
"CWE-787"
] | FFmpeg | 1f097d168d9cad473dd44010a337c1413a9cd198 | 112,262,741,681,516,590,000,000,000,000,000,000,000 | 86 | 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 |
void arch_pick_mmap_layout(struct mm_struct *mm)
{
/*
* Fall back to the standard layout if the personality bit is set, or
* if the expected stack growth is unlimited:
*/
if (mmap_is_legacy()) {
mm->mmap_base = TASK_UNMAPPED_BASE;
mm->get_unmapped_area = arch_get_unmapped_area;
} else {
mm->mmap_base = m... | 0 | [] | linux | d6c763afab142a85e4770b4bc2a5f40f256d5c5d | 328,300,029,749,489,770,000,000,000,000,000,000,000 | 14 | arm64/mm: Remove hack in mmap randomize layout
Since commit 8a0a9bd4db63 ('random: make get_random_int() more
random'), get_random_int() returns a random value for each call,
so comment and hack introduced in mmap_rnd() as part of commit
1d18c47c735e ('arm64: MMU fault handling and page table management')
are incorrec... |
xmlSchemaClearAttrInfos(xmlSchemaValidCtxtPtr vctxt)
{
int i;
xmlSchemaAttrInfoPtr attr;
if (vctxt->nbAttrInfos == 0)
return;
for (i = 0; i < vctxt->nbAttrInfos; i++) {
attr = vctxt->attrInfos[i];
if (attr->flags & XML_SCHEMA_NODE_INFO_FLAG_OWNED_NAMES) {
if (attr->localName != NULL)
xmlFree(... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 164,832,878,077,595,340,000,000,000,000,000,000,000 | 27 | Fix some format string warnings with possible format string vulnerability
For https://bugzilla.gnome.org/show_bug.cgi?id=761029
Decorate every method in libxml2 with the appropriate
LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups
following the reports. |
static void dwc3_pci_remove(struct pci_dev *pci)
{
struct dwc3_pci *dwc = pci_get_drvdata(pci);
struct pci_dev *pdev = dwc->pci;
if (pdev->device == PCI_DEVICE_ID_INTEL_BYT)
gpiod_remove_lookup_table(&platform_bytcr_gpios);
#ifdef CONFIG_PM
cancel_work_sync(&dwc->wakeup_work);
#endif
device_init_wakeup(&pci->... | 0 | [
"CWE-401"
] | linux | 9bbfceea12a8f145097a27d7c7267af25893c060 | 157,544,391,505,276,520,000,000,000,000,000,000,000 | 14 | usb: dwc3: pci: prevent memory leak in dwc3_pci_probe
In dwc3_pci_probe a call to platform_device_alloc allocates a device
which is correctly put in case of error except one case: when the call to
platform_device_add_properties fails it directly returns instead of
going to error handling. This commit replaces return w... |
clientInterpretRequestHeaders(ClientHttpRequest * http)
{
HttpRequest *request = http->request;
HttpHeader *req_hdr = &request->header;
bool no_cache = false;
request->imslen = -1;
request->ims = req_hdr->getTime(Http::HdrType::IF_MODIFIED_SINCE);
if (request->ims > 0)
request->flags.i... | 1 | [
"CWE-116"
] | squid | 7024fb734a59409889e53df2257b3fc817809fb4 | 262,990,396,721,541,020,000,000,000,000,000,000,000 | 135 | Handle more Range requests (#790)
Also removed some effectively unused code. |
njs_generate_for_let_update(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_parser_node_t *let;
njs_vmcode_variable_t *code_var;
njs_variable_reference_t *ref;
while (node != NULL && node->token_type == NJS_TOKEN_STATEMENT) {
let = node->right;
... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 213,084,515,457,912,270,000,000,000,000,000,000,000 | 29 | Fixed break instruction in a try-catch block.
Previously, JUMP offset for a break instruction inside a try-catch
block was not set to a correct offset during code generation
when a return instruction was present in inner try-catch block.
The fix is to update the JUMP offset appropriately.
This closes #553 issue on G... |
TEST_F(HttpConnectionManagerImplTest, TestAccessLog) {
static constexpr char local_address[] = "0.0.0.0";
static constexpr char xff_address[] = "1.2.3.4";
// stream_info.downstreamRemoteAddress will infer the address from request
// headers instead of the physical connection
use_remote_address_ = false;
se... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 300,840,432,525,598,600,000,000,000,000,000,000,000 | 56 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
int ssl_set_hostname( ssl_context *ssl, const char *hostname )
{
if( hostname == NULL )
return( POLARSSL_ERR_SSL_BAD_INPUT_DATA );
ssl->hostname_len = strlen( hostname );
ssl->hostname = (unsigned char *) malloc( ssl->hostname_len + 1 );
if( ssl->hostname == NULL )
return( POLARSSL_ERR... | 0 | [
"CWE-20"
] | polarssl | 1922a4e6aade7b1d685af19d4d9339ddb5c02859 | 244,839,080,251,152,080,000,000,000,000,000,000,000 | 18 | ssl_parse_certificate() now calls x509parse_crt_der() directly |
static long pipe_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
struct pipe_inode_info *pipe = filp->private_data;
unsigned int count, head, tail, mask;
switch (cmd) {
case FIONREAD:
__pipe_lock(pipe);
count = 0;
head = pipe->head;
tail = pipe->tail;
mask = pipe->ring_size - 1;
while ... | 0 | [
"CWE-362"
] | linux | 189b0ddc245139af81198d1a3637cac74f96e13a | 16,770,024,936,782,662,000,000,000,000,000,000,000 | 39 | pipe: Fix missing lock in pipe_resize_ring()
pipe_resize_ring() needs to take the pipe->rd_wait.lock spinlock to
prevent post_one_notification() from trying to insert into the ring
whilst the ring is being replaced.
The occupancy check must be done after the lock is taken, and the lock
must be taken after the new rin... |
win_exchange(long Prenum)
{
frame_T *frp;
frame_T *frp2;
win_T *wp;
win_T *wp2;
int temp;
if (ERROR_IF_ANY_POPUP_WINDOW)
return;
if (ONE_WINDOW) // just one window
{
beep_flush();
return;
}
#ifdef FEAT_GUI
need_mouse_correct = TRUE;
#endif
/*
* find window to ... | 1 | [
"CWE-703",
"CWE-125"
] | vim | 05b27615481e72e3b338bb12990fb3e0c2ecc2a9 | 285,360,446,716,566,540,000,000,000,000,000,000,000 | 84 | patch 8.2.4154: ml_get error when exchanging windows in Visual mode
Problem: ml_get error when exchanging windows in Visual mode.
Solution: Correct end of Visual area when entering another buffer. |
static ut64 binobj_a2b(RBinObject *o, ut64 addr) {
return addr + (o? o->baddr_shift: 0);
} | 0 | [
"CWE-125"
] | radare2 | d31c4d3cbdbe01ea3ded16a584de94149ecd31d9 | 197,745,870,594,662,900,000,000,000,000,000,000,000 | 3 | Fix #8748 - Fix oobread on string search |
static int php_stream_temp_close(php_stream *stream, int close_handle TSRMLS_DC)
{
php_stream_temp_data *ts = (php_stream_temp_data*)stream->abstract;
int ret;
assert(ts != NULL);
if (ts->innerstream) {
ret = php_stream_free_enclosed(ts->innerstream, PHP_STREAM_FREE_CLOSE | (close_handle ? 0 : PHP_STREAM_FREE_P... | 1 | [
"CWE-20"
] | php-src | 6297a117d77fa3a0df2e21ca926a92c231819cd5 | 315,460,441,278,345,400,000,000,000,000,000,000,000 | 21 | Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input |
callbacks_quit_activate (GtkMenuItem *menuitem,
gpointer user_data)
{
gboolean layers_dirty = FALSE;
gint idx;
for (idx = 0; idx<=mainProject->last_loaded; idx++) {
if (mainProject->file[idx] == NULL) break;
layers_dirty = layers_d... | 0 | [
"CWE-200"
] | gerbv | 319a8af890e4d0a5c38e6d08f510da8eefc42537 | 97,713,386,613,313,080,000,000,000,000,000,000,000 | 59 | Remove local alias to parameter array
Normalizing access to `gerbv_simplified_amacro_t::parameter` as a step to fix CVE-2021-40402 |
long arch_ptrace(struct task_struct *child, long request, long addr, long data)
{
long i, ret;
unsigned ui;
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
case PTRACE_PEEKDATA:
ret = generic_ptrace_peekdata(child, ... | 0 | [
"CWE-20"
] | linux-2.6 | 29eb51101c02df517ca64ec472d7501127ad1da8 | 308,436,442,897,270,200,000,000,000,000,000,000,000 | 257 | Handle bogus %cs selector in single-step instruction decoding
The code for LDT segment selectors was not robust in the face of a bogus
selector set in %cs via ptrace before the single-step was done.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> |
String_Obj Parser::parse_url_function_string()
{
std::string prefix("");
if (lex< uri_prefix >()) {
prefix = std::string(lexed);
}
lex < optional_spaces >();
String_Obj url_string = parse_url_function_argument();
std::string suffix("");
if (lex< real_uri_suffix >()) {
suffi... | 0 | [
"CWE-674"
] | libsass | f2db04883e5fff4e03777dcc1eb60d4373c45be1 | 131,850,000,263,222,000,000,000,000,000,000,000,000 | 31 | Make `parse_css_variable_value` non-recursive
Fixes #2658 stack overflow |
read_image(Gif_Reader *grr, Gif_Context *gfc, Gif_Image *gfi, int read_flags)
/* returns 0 on memory error */
{
uint8_t packed;
gfi->left = gifgetunsigned(grr);
gfi->top = gifgetunsigned(grr);
gfi->width = gifgetunsigned(grr);
gfi->height = gifgetunsigned(grr);
/* Mainline GIF processors (Firefox, etc... | 0 | [
"CWE-416"
] | gifsicle | 81fd7823f6d9c85ab598bc850e40382068361185 | 230,919,041,842,247,750,000,000,000,000,000,000,000 | 67 | Fix use-after-free problems reported in #114. |
static int ldb_match_substring(struct ldb_context *ldb,
const struct ldb_message *msg,
const struct ldb_parse_tree *tree,
enum ldb_scope scope, bool *matched)
{
unsigned int i;
struct ldb_message_element *el;
el = ldb_msg_find_element(msg, tree->u.substring.attr);
if (el == NULL) {
... | 0 | [
"CWE-189"
] | samba | ec504dbf69636a554add1f3d5703dd6c3ad450b8 | 285,926,947,164,792,700,000,000,000,000,000,000,000 | 24 | CVE-2015-3223: lib: ldb: Cope with canonicalise_fn returning string "", length 0.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11325
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org> |
GF_Err gf_isom_avc_set_inband_config(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex)
{
return gf_isom_avc_config_update_ex(the_file, trackNumber, DescriptionIndex, NULL, 3);
} | 0 | [
"CWE-119",
"CWE-787"
] | gpac | 90dc7f853d31b0a4e9441cba97feccf36d8b69a4 | 265,798,775,835,343,030,000,000,000,000,000,000,000 | 4 | fix some exploitable overflows (#994, #997) |
void vp8_mc_chroma(VP8Context *s, VP8ThreadData *td, uint8_t *dst1,
uint8_t *dst2, ThreadFrame *ref, const VP56mv *mv,
int x_off, int y_off, int block_w, int block_h,
int width, int height, ptrdiff_t linesize,
vp8_mc_func mc_func[3][3])
{
u... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef | 230,486,545,177,113,970,000,000,000,000,000,000,000 | 48 | avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbult... |
mrb_protect_error(mrb_state *mrb, mrb_protect_error_func *body, void *userdata, mrb_bool *error)
{
struct mrb_jmpbuf *prev_jmp = mrb->jmp;
struct mrb_jmpbuf c_jmp;
mrb_value result = mrb_nil_value();
int ai = mrb_gc_arena_save(mrb);
const struct mrb_context *c = mrb->c;
ptrdiff_t ci_index = c->ci - c->cibas... | 0 | [
"CWE-122",
"CWE-787"
] | mruby | 47068ae07a5fa3aa9a1879cdfe98a9ce0f339299 | 135,701,025,568,067,530,000,000,000,000,000,000,000 | 41 | vm.c: packed arguments length may be zero for `send` method. |
reAnchorAny(Buffer *buf, char *re,
Anchor *(*anchorproc) (Buffer *, char *, char *, int, int))
{
Line *l;
char *p = NULL, *p1, *p2;
if (re == NULL || *re == '\0') {
return NULL;
}
if ((re = regexCompile(re, 1)) != NULL) {
return re;
}
for (l = MarkAllPages ? buf->firstLine : buf->top... | 0 | [
"CWE-119"
] | w3m | 4e464819dd360ffd3d58fa2a89216fe413cfcc74 | 252,341,621,848,015,350,000,000,000,000,000,000,000 | 33 | Prevent segfault due to buffer overflows in addMultirowsForm
Bug-Debian: https://github.com/tats/w3m/issues/21
Bug-Debian: https://github.com/tats/w3m/issues/26 |
void set_remote_locators(
const RemoteLocatorList& /*locators*/,
const NetworkFactory& /*network*/,
bool /*use_multicast*/)
{
} | 0 | [
"CWE-284"
] | Fast-DDS | d2aeab37eb4fad4376b68ea4dfbbf285a2926384 | 274,552,405,749,878,020,000,000,000,000,000,000,000 | 6 | check remote permissions (#1387)
* Refs 5346. Blackbox test
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. one-way string compare
Signed-off-by: Iker Luengo <ikerluengo@eprosima.com>
* Refs 5346. Do not add partition separator on last partition
Signed-off-by: Iker Luengo <ikerluengo@e... |
bool asn1_read_ContextSimple(struct asn1_data *data, uint8_t num, DATA_BLOB *blob)
{
int len;
ZERO_STRUCTP(blob);
if (!asn1_start_tag(data, ASN1_CONTEXT_SIMPLE(num))) return false;
len = asn1_tag_remaining(data);
if (len < 0) {
data->has_error = true;
return false;
}
*blob = data_blob(NULL, len);
if ((len !... | 0 | [
"CWE-399"
] | samba | 9d989c9dd7a5b92d0c5d65287935471b83b6e884 | 338,409,496,451,875,360,000,000,000,000,000,000,000 | 18 | CVE-2015-7540: lib: util: Check *every* asn1 return call and early return.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=9187
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Sep... |
eafnosupport_fib6_lookup(struct net *net, int oif, struct flowi6 *fl6,
struct fib6_result *res, int flags)
{
return -EAFNOSUPPORT;
} | 0 | [] | net | 6c8991f41546c3c472503dff1ea9daaddf9331c2 | 17,726,646,360,925,700,000,000,000,000,000,000,000 | 5 | net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup
ipv6_stub uses the ip6_dst_lookup function to allow other modules to
perform IPv6 lookups. However, this function skips the XFRM layer
entirely.
All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the
ip_route_output_key and ip_route_o... |
TEST_P(Http2CodecImplTest, SmallMetadataVecTest) {
allow_metadata_ = true;
initialize();
// Generates a valid stream_id by sending a request header.
TestHeaderMapImpl request_headers;
HttpTestUtility::addDefaultHeaders(request_headers);
EXPECT_CALL(request_decoder_, decodeHeaders_(_, true));
request_enco... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 277,467,897,981,279,200,000,000,000,000,000,000,000 | 29 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
static OFCondition echoSCP( T_ASC_Association * assoc, T_DIMSE_Message * msg, T_ASC_PresentationContextID presID)
{
OFString temp_str;
// assign the actual information of the C-Echo-RQ command to a local variable
T_DIMSE_C_EchoRQ *req = &msg->msg.CEchoRQ;
if (storescpLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVE... | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 316,700,482,153,018,000,000,000,000,000,000,000,000 | 21 | Make sure to handle setuid() return code properly.
In some tools the return value of setuid() is not checked. In the worst
case this could lead to privilege escalation since the process does not
give up its root privileges and continue as root. |
static int __meminit __add_section(int nid, struct zone *zone,
unsigned long phys_start_pfn)
{
int nr_pages = PAGES_PER_SECTION;
int ret;
if (pfn_valid(phys_start_pfn))
return -EEXIST;
ret = sparse_add_one_section(zone, phys_start_pfn, nr_pages);
if (ret < 0)
return ret;
ret = __add_zone(zone, phys_s... | 0 | [] | linux-2.6 | 08dff7b7d629807dbb1f398c68dd9cd58dd657a1 | 275,050,514,486,283,360,000,000,000,000,000,000,000 | 21 | mm/hotplug: correctly add new zone to all other nodes' zone lists
When online_pages() is called to add new memory to an empty zone, it
rebuilds all zone lists by calling build_all_zonelists(). But there's a
bug which prevents the new zone to be added to other nodes' zone lists.
online_pages() {
build_all_zonelists(... |
d_lite_mday(VALUE self)
{
get_d1(self);
return INT2FIX(m_mday(dat));
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 270,614,006,363,594,770,000,000,000,000,000,000,000 | 5 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
ip_ruby_cmd(clientData, interp, argc, argv)
ClientData clientData;
Tcl_Interp *interp;
int argc;
char *argv[];
#endif
{
volatile VALUE receiver;
volatile ID method;
volatile VALUE args;
char *str;
int i;
int len;
struct cmd_body_arg *arg;
int thr_crit_bup;
VALUE old_... | 0 | [] | tk | d098136e3f62a4879a7d7cd34bbd50f482ba3331 | 96,003,163,673,889,890,000,000,000,000,000,000,000 | 107 | tcltklib.c: use StringValueCStr [ci skip]
* ext/tk/tcltklib.c (set_max_block_time, tcl_protect_core,
ip_init, ip_create_slave_core, get_obj_from_str,
ip_cancel_eval_core, lib_set_system_encoding,
alloc_invoke_arguments, lib_merge_tklist): use StringValueCStr
instead of StringValuePtr for values to be passed to... |
static int jit_compile(pcre2_code *code, sljit_u32 mode)
{
pcre2_real_code *re = (pcre2_real_code *)code;
struct sljit_compiler *compiler;
backtrack_common rootbacktrack;
compiler_common common_data;
compiler_common *common = &common_data;
const sljit_u8 *tables = re->tables;
void *allocator_data = &re->memctl;
int pri... | 0 | [
"CWE-703",
"CWE-125"
] | pcre2 | 03654e751e7f0700693526b67dfcadda6b42c9d0 | 64,616,293,610,244,000,000,000,000,000,000,000,000 | 669 | Fixed an issue affecting recursions in JIT |
my_log2(int x)
{
int i = 0;
if (x <= 0)
return 0;
while ((1<<i) <= x && (1<<i) > 0)
i++;
if ((1<<i) <= 0)
return 0;
return i;
} | 0 | [
"CWE-119"
] | mupdf | 520cc26d18c9ee245b56e9e91f9d4fcae02be5f0 | 90,161,249,389,817,300,000,000,000,000,000,000,000 | 15 | Bug 689699: Avoid buffer overrun.
When cleaning a pdf file, various lists (of pdf_xref_len length) are
defined early on.
If we trigger a repair during the clean, this can cause pdf_xref_len
to increase causing an overrun.
Fix this by watching for changes in the length, and checking accesses
to the list for validity.... |
int wc_ecc_init_ex(ecc_key* key, void* heap, int devId)
{
int ret = 0;
if (key == NULL) {
return BAD_FUNC_ARG;
}
#ifdef ECC_DUMP_OID
wc_ecc_dump_oids();
#endif
XMEMSET(key, 0, sizeof(ecc_key));
key->state = ECC_STATE_NONE;
#if defined(PLUTON_CRYPTO_ECC) || defined(WOLF_CRYPTO_CB)
... | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 193,392,415,837,031,500,000,000,000,000,000,000,000 | 61 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
alloc_group_fields(JOIN *join,ORDER *group)
{
if (group)
{
for (; group ; group=group->next)
{
Cached_item *tmp=new_Cached_item(join->thd, *group->item, TRUE);
if (!tmp || join->group_fields.push_front(tmp))
return TRUE;
}
}
join->sort_and_group=1; /* Mark for do_select */
return FA... | 0 | [] | server | ff77a09bda884fe6bf3917eb29b9d3a2f53f919b | 112,493,114,348,527,540,000,000,000,000,000,000,000 | 14 | MDEV-22464 Server crash on UPDATE with nested subquery
Uninitialized ref_pointer_array[] because setup_fields() got empty
fields list. mysql_multi_update() for some reason does that by
substituting the fields list with empty total_list for the
mysql_select() call (looks like wrong merge since total_list is not
used a... |
\param referer Referer used, as a C-string.
\return Value of \c filename_local.
\note Use the \c libcurl library, or the external binaries \c wget or \c curl to perform the download.
**/
inline char *load_network(const char *const url, char *const filename_local,
... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 195,756,413,359,692,100,000,000,000,000,000,000,000 | 127 | . |
void LinkResolver::check_field_accessability(Klass* ref_klass,
Klass* resolved_klass,
Klass* sel_klass,
const fieldDescriptor& fd,
TRAPS) {
... | 0 | [] | jdk17u | 860464e46105b98ccf21e98abe2dc6e80155887c | 229,853,857,791,400,850,000,000,000,000,000,000,000 | 39 | 8281866: Enhance MethodHandle invocations
Reviewed-by: mbaesken
Backport-of: d974d9da365f787f67971d88c79371c8b0769f75 |
midi_synth_start_note(int dev, int channel, int note, int velocity)
{
int orig_dev = synth_devs[dev]->midi_dev;
int msg, chn;
if (note < 0 || note > 127)
return 0;
if (channel < 0 || channel > 15)
return 0;
if (velocity < 0)
velocity = 0;
if (velocity > 127)
velocity = 127;
leav... | 0 | [
"CWE-703",
"CWE-189"
] | linux | b769f49463711205d57286e64cf535ed4daf59e9 | 182,998,413,210,691,300,000,000,000,000,000,000,000 | 39 | sound/oss: remove offset from load_patch callbacks
Was: [PATCH] sound/oss/midi_synth: prevent underflow, use of
uninitialized value, and signedness issue
The offset passed to midi_synth_load_patch() can be essentially
arbitrary. If it's greater than the header length, this will result in
a copy_from_user(dst, src, n... |
int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn)
{
BUG_ON(!(vma->vm_flags & VM_MIXEDMAP));
if (addr < vma->vm_start || addr >= vma->vm_end)
return -EFAULT;
/*
* If we don't have pte special, then we have to use the pfn_valid()
* based VM_MIXEDMAP scheme (see vm_normal... | 0 | [
"CWE-20"
] | linux-2.6 | 89f5b7da2a6bad2e84670422ab8192382a5aeb9f | 259,831,448,603,174,400,000,000,000,000,000,000,000 | 22 | Reinstate ZERO_PAGE optimization in 'get_user_pages()' and fix XIP
KAMEZAWA Hiroyuki and Oleg Nesterov point out that since the commit
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") removed
the ZERO_PAGE from the VM mappings, any users of get_user_pages() will
generally now populate the VM with real emp... |
int platform_get_irq_byname(struct platform_device *dev, const char *name)
{
int ret;
ret = __platform_get_irq_byname(dev, name);
if (ret < 0 && ret != -EPROBE_DEFER)
dev_err(&dev->dev, "IRQ %s not found\n", name);
return ret;
} | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 124,857,042,852,083,720,000,000,000,000,000,000,000 | 10 | drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
Convert the various sprintf fmaily calls in sysfs device show functions
to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety.
Done with:
$ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 .
And cocci script:
$ cat s... |
static void swoole_serialize_arr(seriaString *buffer, zend_array *zvalue)
{
zval *data;
zend_string *key;
zend_ulong index;
swPoolstr *swStr = NULL;
zend_uchar is_pack = zvalue->u.flags & HASH_FLAG_PACKED;
ZEND_HASH_FOREACH_KEY_VAL(zvalue, index, key, data)
{
SBucketType type = {0};... | 0 | [
"CWE-200",
"CWE-502"
] | swoole-src | 4cdbce5d9bf2fe596bb6acd7d6611f9e8c253a76 | 181,239,441,202,436,770,000,000,000,000,000,000,000 | 210 | add buffer end check |
getToken(FileInfo *file, CharsString *result, const char *description) {
/* Find the next string of contiguous non-whitespace characters. If this
* is the last token on the line, return 2 instead of 1. */
while (!atEndOfLine(file) && atTokenDelimiter(file)) file->linepos++;
result->length = 0;
while (!atEndOfLine... | 0 | [
"CWE-787"
] | liblouis | 2e4772befb2b1c37cb4b9d6572945115ee28630a | 33,140,742,340,182,010,000,000,000,000,000,000,000 | 22 | Prevent an invalid memory writes in compileRule
Thanks to Han Zheng for reporting it
Fixes #1214 |
registerName(Buffer *buf, char *url, int line, int pos)
{
Anchor *a;
buf->name = putAnchor(buf->name, url, NULL, &a, NULL, NULL, '\0', line,
pos);
return a;
} | 0 | [
"CWE-119"
] | w3m | 4e464819dd360ffd3d58fa2a89216fe413cfcc74 | 226,710,096,985,358,230,000,000,000,000,000,000,000 | 7 | Prevent segfault due to buffer overflows in addMultirowsForm
Bug-Debian: https://github.com/tats/w3m/issues/21
Bug-Debian: https://github.com/tats/w3m/issues/26 |
bool Alter_table_prelocking_strategy::
handle_table(THD *thd, Query_tables_list *prelocking_ctx,
TABLE_LIST *table_list, bool *need_prelocking)
{
return FALSE;
} | 0 | [] | server | 0168d1eda30dad4b517659422e347175eb89e923 | 67,367,610,433,123,450,000,000,000,000,000,000,000 | 6 | MDEV-25766 Unused CTE lead to a crash in find_field_in_tables/find_order_in_list
Do not assume that subquery Item always present. |
void ecryptfs_set_default_sizes(struct ecryptfs_crypt_stat *crypt_stat)
{
/* Default values; may be overwritten as we are parsing the
* packets. */
crypt_stat->extent_size = ECRYPTFS_DEFAULT_EXTENT_SIZE;
set_extent_mask_and_shift(crypt_stat);
crypt_stat->iv_bytes = ECRYPTFS_DEFAULT_IV_BYTES;
if (crypt_stat->flag... | 0 | [
"CWE-189"
] | linux-2.6 | 8faece5f906725c10e7a1f6caf84452abadbdc7b | 98,452,490,623,481,420,000,000,000,000,000,000,000 | 17 | eCryptfs: Allocate a variable number of pages for file headers
When allocating the memory used to store the eCryptfs header contents, a
single, zeroed page was being allocated with get_zeroed_page().
However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or
ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche... |
void SplashOutputDev::clearSoftMask(GfxState *state) {
splash->setSoftMask(nullptr);
} | 0 | [
"CWE-369"
] | poppler | b224e2f5739fe61de9fa69955d016725b2a4b78d | 40,439,110,486,535,377,000,000,000,000,000,000,000 | 3 | SplashOutputDev::tilingPatternFill: Fix crash on broken file
Issue #802 |
static int ext4_ext_remove_space(struct inode *inode, ext4_lblk_t start,
ext4_lblk_t end)
{
struct super_block *sb = inode->i_sb;
int depth = ext_depth(inode);
struct ext4_ext_path *path = NULL;
ext4_fsblk_t partial_cluster = 0;
handle_t *handle;
int i = 0, err = 0;
ext_debug("truncate since %u to %u\n", s... | 0 | [
"CWE-362"
] | linux-2.6 | dee1f973ca341c266229faa5a1a5bb268bed3531 | 310,262,822,421,803,400,000,000,000,000,000,000,000 | 229 | ext4: race-condition protection for ext4_convert_unwritten_extents_endio
We assumed that at the time we call ext4_convert_unwritten_extents_endio()
extent in question is fully inside [map.m_lblk, map->m_len] because
it was already split during submission. But this may not be true due to
a race between writeback vs fa... |
static uint kill_threads_for_user(THD *thd, LEX_USER *user,
killed_state kill_signal, ha_rows *rows)
{
THD *tmp;
List<THD> threads_to_kill;
DBUG_ENTER("kill_threads_for_user");
*rows= 0;
if (thd->is_fatal_error) // If we run out of memory
DBUG_RETU... | 0 | [] | server | ba4927e520190bbad763bb5260ae154f29a61231 | 130,828,446,044,702,830,000,000,000,000,000,000,000 | 64 | MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ...
Window Functions code tries to minimize the number of times it
needs to sort the select's resultset by finding "compatible"
OVER (PARTITION BY ... ORDER BY ...) clauses.
This employs compare_order_elements(). That function assumed that
the order expressions... |
static inline int nlm_pidbusy(struct nlm_host *host, uint32_t pid)
{
struct nlm_lockowner *lockowner;
list_for_each_entry(lockowner, &host->h_lockowners, list) {
if (lockowner->pid == pid)
return -EBUSY;
}
return 0;
} | 0 | [
"CWE-400",
"CWE-399",
"CWE-703"
] | linux | 0b760113a3a155269a3fba93a409c640031dd68f | 307,762,711,689,517,730,000,000,000,000,000,000,000 | 9 | NLM: Don't hang forever on NLM unlock requests
If the NLM daemon is killed on the NFS server, we can currently end up
hanging forever on an 'unlock' request, instead of aborting. Basically,
if the rpcbind request fails, or the server keeps returning garbage, we
really want to quit instead of retrying.
Tested-by: Vasi... |
vte_sequence_handler_erase_in_display (VteTerminal *terminal, GValueArray *params)
{
GValue *value;
long param;
guint i;
/* The default parameter is 0. */
param = 0;
/* Pull out a parameter. */
for (i = 0; (params != NULL) && (i < params->n_values); i++) {
value = g_value_array_get_nth(params, i);
if (!G_VAL... | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 181,254,729,514,457,100,000,000,000,000,000,000,000 | 38 | fix bug #548272
svn path=/trunk/; revision=2365 |
cleanup_dead_jobs ()
{
register int i;
int os;
if (js.j_jobslots == 0 || jobs_list_frozen)
return;
QUEUE_SIGCHLD(os);
/* XXX could use js.j_firstj and js.j_lastj here */
for (i = 0; i < js.j_jobslots; i++)
{
#if defined (DEBUG)
if (i < js.j_firstj && jobs[i])
itrace("cleanup_dead_jobs: job... | 0 | [] | bash | 955543877583837c85470f7fb8a97b7aa8d45e6c | 47,476,331,109,334,190,000,000,000,000,000,000,000 | 39 | bash-4.4-rc2 release |
static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
{
struct nfs_inode *nfsi = NFS_I(state->inode);
unsigned char fl_flags = request->fl_flags;
int status;
/* Is this a delegated open? */
status = nfs4_set_lock_state(state, request);
if (status != 0)
goto out;
request->fl... | 0 | [
"CWE-703"
] | linux | dc0b027dfadfcb8a5504f7d8052754bf8d501ab9 | 27,450,878,828,983,204,000,000,000,000,000,000,000 | 35 | NFSv4: Convert the open and close ops to use fmode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com> |
static int get_line(JournalImporter *imp, char **line, size_t *size) {
ssize_t n;
char *c = NULL;
assert(imp);
assert(imp->state == IMPORTER_STATE_LINE);
assert(imp->offset <= imp->filled);
assert(imp->filled <= imp->size);
assert(!imp->buf || imp->size > 0);
... | 0 | [
"CWE-770"
] | systemd | ef4d6abe7c7fab6cbff975b32e76b09feee56074 | 289,716,361,449,774,160,000,000,000,000,000,000,000 | 63 | journal-remote: set a limit on the number of fields in a message
Existing use of E2BIG is replaced with ENOBUFS (entry too long), and E2BIG is
reused for the new error condition (too many fields).
This matches the change done for systemd-journald, hence forming the second
part of the fix for CVE-2018-16865
(https://b... |
/* Must be called with bfqq != NULL */
static void bfq_bfqq_end_wr(struct bfq_queue *bfqq)
{
if (bfq_bfqq_busy(bfqq))
bfqq->bfqd->wr_busy_queues--;
bfqq->wr_coeff = 1;
bfqq->wr_cur_max_time = 0;
bfqq->last_wr_start_finish = jiffies;
/*
* Trigger a weight change on the next invocation of
* __bfq_entity_update... | 0 | [
"CWE-416"
] | linux | 2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9 | 48,109,608,924,822,960,000,000,000,000,000,000,000 | 13 | block, bfq: fix use-after-free in bfq_idle_slice_timer_body
In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is
not in bfqd-lock critical section. The bfqq, which is not
equal to NULL in bfq_idle_slice_timer, may be freed after passing
to bfq_idle_slice_timer_body. So we will access the freed memory.
In ad... |
ModuleExport void UnregisterCUTImage(void)
{
(void) UnregisterMagickInfo("CUT");
} | 0 | [
"CWE-787"
] | ImageMagick | cc4ac341f29fa368da6ef01c207deaf8c61f6a2e | 14,394,715,038,966,709,000,000,000,000,000,000,000 | 4 | https://github.com/ImageMagick/ImageMagick/issues/1162 |
void Inspect::operator()(Arguments_Ptr a)
{
append_string("(");
if (!a->empty()) {
(*a)[0]->perform(this);
for (size_t i = 1, L = a->length(); i < L; ++i) {
append_string(", "); // verified
// Sass Bug? append_comma_separator();
(*a)[i]->perform(this);
}
}
a... | 0 | [
"CWE-476"
] | libsass | 38f4c3699d06b64128bebc7cf1e8b3125be74dc4 | 313,144,907,110,220,200,000,000,000,000,000,000,000 | 13 | Fix possible bug with handling empty reference combinators
Fixes #2665 |
const EVP_MD *tls12_get_hash(unsigned char hash_alg)
{
const tls12_hash_info *inf;
#ifndef OPENSSL_FIPS
if (hash_alg == TLSEXT_hash_md5 && FIPS_mode())
return NULL;
#endif
inf = tls12_get_hash_info(hash_alg);
if (!inf || !inf->mfunc)
return NULL;
return inf->mfunc();
} | 0 | [] | openssl | 80bd7b41b30af6ee96f519e629463583318de3b0 | 217,230,975,512,929,430,000,000,000,000,000,000,000 | 12 | Fix SRP ciphersuite DoS vulnerability.
If a client attempted to use an SRP ciphersuite and it had not been
set up correctly it would crash with a null pointer read. A malicious
server could exploit this in a DoS attack.
Thanks to Joonas Kuorilehto and Riku Hietamäki from Codenomicon
for reporting this issue.
CVE-201... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.