func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
int sctp_verify_init(struct net *net, const struct sctp_association *asoc,
sctp_cid_t cid,
sctp_init_chunk_t *peer_init,
struct sctp_chunk *chunk,
struct sctp_chunk **errp)
{
union sctp_params param;
int has_cookie = 0;
int result;
/* Verify stream values are non-zero. */
if ((0 == pee... | 0 | [] | linux | 196d67593439b03088913227093e374235596e33 | 74,643,930,291,121,010,000,000,000,000,000,000,000 | 63 | sctp: Add support to per-association statistics via a new SCTP_GET_ASSOC_STATS call
The current SCTP stack is lacking a mechanism to have per association
statistics. This is an implementation modeled after OpenSolaris'
SCTP_GET_ASSOC_STATS.
Userspace part will follow on lksctp if/when there is a general ACK on
this.
... |
int pagecache_write_end(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned copied,
struct page *page, void *fsdata)
{
const struct address_space_operations *aops = mapping->a_ops;
int ret;
if (aops->write_end) {
mark_page_accessed(page);
ret = aops->write_end(file, mapp... | 0 | [
"CWE-193"
] | linux-2.6 | 94ad374a0751f40d25e22e036c37f7263569d24c | 103,787,926,761,011,800,000,000,000,000,000,000,000 | 32 | Fix off-by-one error in iov_iter_advance()
The iov_iter_advance() function would look at the iov->iov_len entry
even though it might have iterated over the whole array, and iov was
pointing past the end. This would cause DEBUG_PAGEALLOC to trigger a
kernel page fault if the allocation was at the end of a page, and th... |
int ldb_kv_guid_to_key(const struct ldb_val *GUID_val,
struct ldb_val *key)
{
const char *GUID_prefix = LDB_KV_GUID_KEY_PREFIX;
const int GUID_prefix_len = sizeof(LDB_KV_GUID_KEY_PREFIX) - 1;
if (key->length != (GUID_val->length+GUID_prefix_len)) {
return LDB_ERR_OPERATIONS_ERROR;
}
memcpy(key->data, ... | 0 | [
"CWE-703"
] | samba | 08c9016cb9f25105c39488770113a1b00f8a4223 | 250,796,943,402,358,900,000,000,000,000,000,000,000 | 15 | CVE-2021-3670 ldb: Confirm the request has not yet timed out in ldb filter processing
The LDB filter processing is where the time is spent in the LDB stack
but the timeout event will not get run while this is ongoing, so we
must confirm we have not yet timed out manually.
RN: Ensure that the LDB request has not timed... |
TfLiteStatus Eval(TfLiteContext* context, TfLiteNode* node) {
OpContext op_context(context, node);
OpData* op_data = reinterpret_cast<OpData*>(node->user_data);
const TfLiteTensor* lhs = GetInput(context, node, kInputLHSTensor);
const TfLiteTensor* rhs = GetInput(context, node, kInputRHSTensor);
TfLiteTensor*... | 1 | [
"CWE-125",
"CWE-787"
] | tensorflow | 1970c2158b1ffa416d159d03c3370b9a462aee35 | 219,756,194,256,079,900,000,000,000,000,000,000,000 | 58 | [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... |
njs_generate_assignment_prop(njs_vm_t *vm, njs_generator_t *generator,
njs_parser_node_t *node)
{
njs_index_t index, src;
njs_parser_node_t *lvalue, *expr, *object, *property;
njs_vmcode_move_t *move;
lvalue = node->left;
expr = node->right;
object = lvalue->left;
property = l... | 0 | [
"CWE-703",
"CWE-754"
] | njs | 404553896792b8f5f429dc8852d15784a59d8d3e | 203,893,971,876,813,800,000,000,000,000,000,000,000 | 47 | 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... |
inline DummyInt _isnan(...) { return DummyInt(); } | 0 | [
"CWE-134",
"CWE-119",
"CWE-787"
] | fmt | 8cf30aa2be256eba07bb1cefb998c52326e846e7 | 5,140,602,918,590,272,300,000,000,000,000,000,000 | 1 | Fix segfault on complex pointer formatting (#642) |
MagickExport Image *AdaptiveThresholdImage(const Image *image,
const size_t width,const size_t height,const ssize_t offset,
ExceptionInfo *exception)
{
#define ThresholdImageTag "Threshold/Image"
CacheView
*image_view,
*threshold_view;
Image
*threshold_image;
MagickBooleanType
status;
M... | 0 | [
"CWE-125"
] | ImageMagick6 | 35c7032723d85eee7318ff6c82f031fa2666b773 | 192,829,003,126,718,530,000,000,000,000,000,000,000 | 199 | https://github.com/ImageMagick/ImageMagick/issues/1609 |
ssize_t cpu_show_mds(struct device *dev, struct device_attribute *attr, char *buf)
{
return cpu_show_common(dev, attr, buf, X86_BUG_MDS);
} | 0 | [] | linux | a2059825986a1c8143fd6698774fa9d83733bb11 | 148,107,053,942,026,470,000,000,000,000,000,000,000 | 4 | x86/speculation: Enable Spectre v1 swapgs mitigations
The previous commit added macro calls in the entry code which mitigate the
Spectre v1 swapgs issue if the X86_FEATURE_FENCE_SWAPGS_* features are
enabled. Enable those features where applicable.
The mitigations may be disabled with "nospectre_v1" or "mitigations... |
static void __net_exit ndisc_net_exit(struct net *net)
{
inet_ctl_sock_destroy(net->ipv6.ndisc_sk);
} | 0 | [
"CWE-17"
] | linux | 6fd99094de2b83d1d4c8457f2c83483b2828e75a | 180,938,271,930,052,620,000,000,000,000,000,000,000 | 4 | ipv6: Don't reduce hop limit for an interface
A local route may have a lower hop_limit set than global routes do.
RFC 3756, Section 4.2.7, "Parameter Spoofing"
> 1. The attacker includes a Current Hop Limit of one or another small
> number which the attacker knows will cause legitimate packets to
> be... |
window_unmap_cb (GSWindow *window,
GSManager *manager)
{
gs_debug ("window unmapped!");
} | 0 | [] | gnome-screensaver | 2f597ea9f1f363277fd4dfc109fa41bbc6225aca | 22,165,663,864,137,625,000,000,000,000,000,000,000 | 5 | Fix adding monitors
Make sure to show windows that are added. And fix an off by one bug. |
int ovs_nla_add_action(struct sw_flow_actions **sfa, int attrtype, void *data,
int len, bool log)
{
struct nlattr *a;
a = __add_action(sfa, attrtype, data, len, log);
return PTR_ERR_OR_ZERO(a);
} | 0 | [
"CWE-362",
"CWE-787"
] | linux | cefa91b2332d7009bc0be5d951d6cbbf349f90f8 | 48,748,375,543,319,695,000,000,000,000,000,000,000 | 9 | openvswitch: fix OOB access in reserve_sfa_size()
Given a sufficiently large number of actions, while copying and
reserving memory for a new action of a new flow, if next_offset is
greater than MAX_ACTIONS_BUFSIZE, the function reserve_sfa_size() does
not return -EMSGSIZE as expected, but it allocates MAX_ACTIONS_BUFS... |
static u16 aux_setup(struct airo_info *ai, u16 page,
u16 offset, u16 *len)
{
u16 next;
OUT4500(ai, AUXPAGE, page);
OUT4500(ai, AUXOFF, 0);
next = IN4500(ai, AUXDATA);
*len = IN4500(ai, AUXDATA)&0xff;
if (offset != 4) OUT4500(ai, AUXOFF, offset);
return next;
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 34,940,978,643,149,178,000,000,000,000,000,000,000 | 12 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
const unsigned char * r_jwe_get_payload(jwe_t * jwe, size_t * payload_len) {
if (jwe != NULL) {
if (payload_len != NULL) {
*payload_len = jwe->payload_len;
}
return jwe->payload;
}
return NULL;
} | 0 | [
"CWE-787"
] | rhonabwy | b4c2923a1ba4fabf9b55a89244127e153a3e549b | 285,322,122,879,853,800,000,000,000,000,000,000,000 | 9 | Fix buffer overflow on r_jwe_aesgcm_key_unwrap |
static void acquire_write_reply(DBusMessage *message, void *user_data)
{
struct pending_op *op = user_data;
struct external_chrc *chrc;
DBusError err;
int fd;
uint16_t mtu;
if (!op->owner_queue) {
DBG("Pending write was canceled when object got removed");
return;
}
chrc = gatt_db_attribute_get_user_data(o... | 0 | [
"CWE-416"
] | bluez | 838c0dc7641e1c991c0f3027bf94bee4606012f8 | 36,251,511,679,002,574,000,000,000,000,000,000,000 | 59 | gatt: Fix not cleaning up when disconnected
There is a current use after free possible on a gatt server if a client
disconnects while a WriteValue call is being processed with dbus.
This patch includes the addition of a pending disconnect callback to handle
cleanup better if a disconnect occurs during a write, an acq... |
smb3_free_compound_rqst(int num_rqst, struct smb_rqst *rqst)
{
int i, j;
for (i = 0; i < num_rqst; i++) {
if (rqst[i].rq_pages) {
for (j = rqst[i].rq_npages - 1; j >= 0; j--)
put_page(rqst[i].rq_pages[j]);
kfree(rqst[i].rq_pages);
}
}
} | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 280,292,695,219,940,000,000,000,000,000,000,000,000 | 12 | cifs: fix NULL ptr dereference in smb2_ioctl_query_info()
When calling smb2_ioctl_query_info() with invalid
smb_query_info::flags, a NULL ptr dereference is triggered when trying
to kfree() uninitialised rqst[n].rq_iov array.
This also fixes leaked paths that are created in SMB2_open_init()
which required SMB2_open_f... |
static int audit_set_backlog_limit(u32 limit)
{
return audit_do_config_change("audit_backlog_limit", &audit_backlog_limit, limit);
} | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 205,536,128,381,123,300,000,000,000,000,000,000,000 | 4 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static struct ppp *ppp_create_interface(struct net *net, int unit,
struct file *file, int *retp)
{
struct ppp *ppp;
struct ppp_net *pn;
struct net_device *dev = NULL;
int ret = -ENOMEM;
int i;
dev = alloc_netdev(sizeof(struct ppp), "", NET_NAME_UNKNOWN,
ppp_setup);
if (!dev)
goto out1;
pn = ppp_p... | 0 | [] | linux | 4ab42d78e37a294ac7bc56901d563c642e03c4ae | 52,548,554,058,573,440,000,000,000,000,000,000,000 | 97 | ppp, slip: Validate VJ compression slot parameters completely
Currently slhc_init() treats out-of-range values of rslots and tslots
as equivalent to 0, except that if tslots is too large it will
dereference a null pointer (CVE-2015-7799).
Add a range-check at the top of the function and make it return an
ERR_PTR() on... |
hup_display_file(fname, complain)
const char *fname UNUSED;
boolean complain UNUSED;
{
return;
} | 0 | [
"CWE-120",
"CWE-269"
] | NetHack | f3def5c0b999478da2d0a8f0b6a7c370a2065f77 | 291,296,848,736,749,460,000,000,000,000,000,000,000 | 6 | command line triggered buffer overruns
Prevent extremely long command line arguments from overflowing local
buffers in raw_printf or config_error_add. The increased buffer
sizes they recently got to deal with long configuration file values
aren't sufficient to handle command line induced overflows.
choose_windows(co... |
/* Release a reference on a zerocopy structure */
static inline void skb_zcopy_clear(struct sk_buff *skb, bool zerocopy)
{
struct ubuf_info *uarg = skb_zcopy(skb);
if (uarg) {
if (uarg->callback == sock_zerocopy_callback) {
uarg->zerocopy = uarg->zerocopy && zerocopy;
sock_zerocopy_put(uarg);
} else {
u... | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 17,553,092,685,987,178,000,000,000,000,000,000,000 | 15 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
TEST_F(RouterTest, RedirectFound) {
MockDirectResponseEntry direct_response;
std::string route_name("route-test-name");
EXPECT_CALL(direct_response, newPath(_)).WillOnce(Return("hello"));
EXPECT_CALL(direct_response, routeName()).WillOnce(ReturnRef(route_name));
EXPECT_CALL(direct_response, rewritePathHeader(... | 0 | [
"CWE-703"
] | envoy | f0bb2219112d8cdb4c4e8b346834f962925362ca | 300,338,266,365,889,320,000,000,000,000,000,000,000 | 23 | [1.20] CVE-2022-21655
Crash with direct_response
Signed-off-by: Otto van der Schaaf <ovanders@redhat.com> |
evutil_parse_servname(const char *servname, const char *protocol,
const struct evutil_addrinfo *hints)
{
int n = parse_numeric_servname(servname);
if (n>=0)
return n;
#if defined(EVENT__HAVE_GETSERVBYNAME) || defined(_WIN32)
if (!(hints->ai_flags & EVUTIL_AI_NUMERICSERV)) {
struct servent *ent = getservbynam... | 0 | [
"CWE-119",
"CWE-787"
] | libevent | 329acc18a0768c21ba22522f01a5c7f46cacc4d5 | 186,931,542,259,061,300,000,000,000,000,000,000,000 | 16 | evutil_parse_sockaddr_port(): fix buffer overflow
@asn-the-goblin-slayer:
"Length between '[' and ']' is cast to signed 32 bit integer on line 1815. Is
the length is more than 2<<31 (INT_MAX), len will hold a negative value.
Consequently, it will pass the check at line 1816. Segfault happens at line
1819.
... |
static long cap_prctl_drop(struct cred *new, unsigned long cap)
{
if (!capable(CAP_SETPCAP))
return -EPERM;
if (!cap_valid(cap))
return -EINVAL;
cap_lower(new->cap_bset, cap);
return 0;
} | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 322,529,261,997,523,880,000,000,000,000,000,000,000 | 10 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
g_vfs_daemon_get_blocking_processes (GVfsDaemon *daemon)
{
GArray *processes;
GList *l;
g_mutex_lock (&daemon->lock);
processes = g_array_new (FALSE, FALSE, sizeof (GPid));
for (l = daemon->job_sources; l != NULL; l = l->next)
{
if (G_VFS_IS_CHANNEL (l->data))
{
GPid pid;
... | 0 | [
"CWE-276"
] | gvfs | e3808a1b4042761055b1d975333a8243d67b8bfe | 94,230,422,173,742,970,000,000,000,000,000,000,000 | 22 | gvfsdaemon: Check that the connecting client is the same user
Otherwise, an attacker who learns the abstract socket address from
netstat(8) or similar could connect to it and issue D-Bus method
calls.
Signed-off-by: Simon McVittie <smcv@collabora.com> |
static int fits_scanfdouble (const char *buf, double *value)
{
int retval = 0;
gchar *bufcopy = g_strdup (buf);
/* We should use g_ascii_strtod. This also allows scanning of hexadecimal */
/* values like 0x02. But we want the behaviour of sscanf ("0x02","%lf",...*/
/* that gives 0.0 in this case. So check the str... | 0 | [
"CWE-476"
] | gimp | ace45631595e8781a1420842582d67160097163c | 111,019,648,020,506,010,000,000,000,000,000,000,000 | 46 | Bug 676804 - file handling DoS for fit file format
Apply patch from joe@reactionis.co.uk which fixes a buffer overflow on
broken/malicious fits files. |
parse_CLEAR_ACTIONS(char *arg OVS_UNUSED, struct ofpbuf *ofpacts,
enum ofputil_protocol *usable_protocols OVS_UNUSED)
{
ofpact_put_CLEAR_ACTIONS(ofpacts);
return NULL;
} | 0 | [
"CWE-125"
] | ovs | 9237a63c47bd314b807cda0bd2216264e82edbe8 | 63,371,213,162,172,810,000,000,000,000,000,000,000 | 6 | ofp-actions: Avoid buffer overread in BUNDLE action decoding.
Reported-at: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9052
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
static BROTLI_INLINE BROTLI_BOOL BrotliSafeReadBits32(
BrotliBitReader* const br, uint32_t n_bits, uint32_t* val) {
BROTLI_DCHECK(n_bits <= 32);
if (BROTLI_64_BITS || (n_bits <= 24)) {
while (BrotliGetAvailableBits(br) < n_bits) {
if (!BrotliPullByte(br)) {
return BROTLI_FALSE;
}
}
... | 0 | [
"CWE-120"
] | brotli | 223d80cfbec8fd346e32906c732c8ede21f0cea6 | 187,799,116,381,552,730,000,000,000,000,000,000,000 | 15 | Update (#826)
* IMPORTANT: decoder: fix potential overflow when input chunk is >2GiB
* simplify max Huffman table size calculation
* eliminate symbol duplicates (static arrays in .h files)
* minor combing in research/ code |
push_new_name_resolution_context(THD *thd,
TABLE_LIST *left_op, TABLE_LIST *right_op)
{
Name_resolution_context *on_context;
if (!(on_context= new (thd->mem_root) Name_resolution_context))
return TRUE;
on_context->init();
on_context->first_name_resolution_table=
left_op-... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 133,055,409,324,292,930,000,000,000,000,000,000,000 | 17 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
int sc_pkcs15emu_sc_hsm_encode_cvc(sc_pkcs15_card_t * p15card,
sc_cvc_t *cvc,
u8 ** buf, size_t *buflen)
{
sc_card_t *card = p15card->card;
struct sc_asn1_entry asn1_cvc[C_ASN1_CVC_SIZE];
struct sc_asn1_entry asn1_cvcert[C_ASN1_CVCERT_SIZE];
struct sc_asn1_entry asn1_cvc_body[C_ASN1_CVC_BODY_SIZE];
struct sc_a... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 286,018,296,740,271,100,000,000,000,000,000,000,000 | 58 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
static int check_gecos_string(const char *msg, char *gecos)
{
const size_t len = strlen(gecos);
if (MAX_FIELD_SIZE < len) {
warnx(_("field %s is too long"), msg);
return -1;
}
if (illegal_passwd_chars(gecos)) {
warnx(_("%s: has illegal characters"), gecos);
return -1;
}
return 0;
} | 0 | [
"CWE-209"
] | util-linux | faa5a3a83ad0cb5e2c303edbfd8cd823c9d94c17 | 246,744,944,642,434,050,000,000,000,000,000,000,000 | 14 | chsh, chfn: remove readline support [CVE-2022-0563]
The readline library uses INPUTRC= environment variable to get a path
to the library config file. When the library cannot parse the
specified file, it prints an error message containing data from the
file.
Unfortunately, the library does not use secure_getenv() (or ... |
void js_pushstring(js_State *J, const char *v)
{
int n = strlen(v);
CHECKSTACK(1);
if (n <= soffsetof(js_Value, type)) {
char *s = STACK[TOP].u.shrstr;
while (n--) *s++ = *v++;
*s = 0;
STACK[TOP].type = JS_TSHRSTR;
} else {
STACK[TOP].type = JS_TMEMSTR;
STACK[TOP].u.memstr = jsV_newmemstring(J, v, n);
... | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 209,230,762,842,054,470,000,000,000,000,000,000,000 | 15 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
DEFUN (no_bgp_client_to_client_reflection,
no_bgp_client_to_client_reflection_cmd,
"no bgp client-to-client reflection",
NO_STR
"BGP specific commands\n"
"Configure client to client route reflection\n"
"reflection of routes allowed\n")
{
struct bgp *bgp;
bgp = vty->index;
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 65,522,125,840,387,580,000,000,000,000,000,000,000 | 14 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
set_16bit(E1000State *s, int index, uint32_t val)
{
s->mac_reg[index] = val & 0xffff;
} | 0 | [
"CWE-120"
] | qemu | b0d9ffcd0251161c7c92f94804dcf599dfa3edeb | 28,871,762,778,642,300,000,000,000,000,000,000,000 | 4 | e1000: Discard packets that are too long if !SBP and !LPE
The e1000_receive function for the e1000 needs to discard packets longer than
1522 bytes if the SBP and LPE flags are disabled. The linux driver assumes
this behavior and allocates memory based on this assumption.
Signed-off-by: Michael Contreras <michael@inet... |
time_t rdbLoadTime(rio *rdb) {
int32_t t32;
if (rioRead(rdb,&t32,4) == 0) return -1;
return (time_t)t32;
} | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 195,939,341,100,513,970,000,000,000,000,000,000,000 | 5 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
static int f_midi_do_transmit(struct f_midi *midi, struct usb_ep *ep)
{
struct usb_request *req = NULL;
unsigned int len, i;
bool active = false;
int err;
/*
* We peek the request in order to reuse it if it fails to enqueue on
* its endpoint
*/
len = kfifo_peek(&midi->in_req_fifo, &req);
if (len != 1) {
... | 0 | [
"CWE-415"
] | linux | 7fafcfdf6377b18b2a726ea554d6e593ba44349f | 223,350,772,395,632,580,000,000,000,000,000,000,000 | 66 | USB: gadget: f_midi: fixing a possible double-free in f_midi
It looks like there is a possibility of a double-free vulnerability on an
error path of the f_midi_set_alt function in the f_midi driver. If the
path is feasible then free_ep_req gets called twice:
req->complete = f_midi_complete;
err = us... |
void worker_start_accept(void* arg)
{
struct worker* worker = (struct worker*)arg;
listen_start_accept(worker->front);
if(worker->thread_num == 0)
daemon_remote_start_accept(worker->daemon->rc);
} | 0 | [
"CWE-613",
"CWE-703"
] | unbound | f6753a0f1018133df552347a199e0362fc1dac68 | 256,782,538,575,230,300,000,000,000,000,000,000,000 | 7 | - Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699. |
removedirs (char const *name)
{
char *filename = xstrdup (name);
size_t i;
for (i = strlen (filename); i != 0; i--)
if (ISSLASH (filename[i])
&& ! (ISSLASH (filename[i - 1])
|| (filename[i - 1] == '.'
&& (i == 1
|| ISSLASH (filename[i - 2])
|| (filename[i - 2] == '.'
&& (i ... | 0 | [
"CWE-59"
] | patch | dce4683cbbe107a95f1f0d45fabc304acfb5d71a | 41,208,303,357,807,316,000,000,000,000,000,000,000 | 22 | Don't follow symlinks unless --follow-symlinks is given
* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file,
append_to_file): Unless the --follow-symlinks option is given, open files with
the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing
that consistently for input files.
* src/u... |
encode_legacy_async_masks(const struct ofputil_async_cfg *ac,
enum ofputil_async_msg_type oam,
enum ofp_version version,
ovs_be32 masks[2])
{
for (int i = 0; i < 2; i++) {
bool master = i == 0;
const struct ofp14_async_pro... | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 240,192,192,564,316,230,000,000,000,000,000,000,000 | 12 | ofp-util: Fix memory leaks on error cases in ofputil_decode_group_mod().
Found by libFuzzer.
Reported-by: Bhargava Shastry <bshastry@sec.t-labs.tu-berlin.de>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org> |
GF_Box *odrb_box_new()
{
ISOM_DECL_BOX_ALLOC(GF_OMADRMRightsObjectBox, GF_ISOM_BOX_TYPE_ODRB);
return (GF_Box *)tmp;
} | 0 | [
"CWE-703"
] | gpac | f19668964bf422cf5a63e4dbe1d3c6c75edadcbb | 206,826,836,457,888,800,000,000,000,000,000,000,000 | 5 | fixed #1879 |
void TearDown() override { SslIntegrationTestBase::TearDown(); }; | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 110,537,250,602,829,540,000,000,000,000,000,000,000 | 1 | 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... |
static void doTest(int w, int h, const int *formats, int nformats, int subsamp,
char *basename)
{
tjhandle chandle = NULL, dhandle = NULL;
unsigned char *dstBuf = NULL;
unsigned long size = 0;
int pfi, pf, i;
if (!alloc)
size = tjBufSize(w, h, subsamp);
if (size != 0)
if ((dstBuf... | 0 | [
"CWE-787"
] | libjpeg-turbo | 2a9e3bd7430cfda1bc812d139e0609c6aca0b884 | 183,700,328,863,850,100,000,000,000,000,000,000,000 | 45 | TurboJPEG: Properly handle gigapixel images
Prevent several integer overflow issues and subsequent segfaults that
occurred when attempting to compress or decompress gigapixel images with
the TurboJPEG API:
- Modify tjBufSize(), tjBufSizeYUV2(), and tjPlaneSizeYUV() to avoid
integer overflow when computing the retur... |
static inline bool kill_as_cred_perm(const struct cred *cred,
struct task_struct *target)
{
const struct cred *pcred = __task_cred(target);
return uid_eq(cred->euid, pcred->suid) ||
uid_eq(cred->euid, pcred->uid) ||
uid_eq(cred->uid, pcred->suid) ||
uid_eq(cred->uid, pcred->uid);
} | 0 | [
"CWE-190"
] | linux | d1e7fd6462ca9fc76650fbe6ca800e35b24267da | 154,532,118,437,472,240,000,000,000,000,000,000,000 | 10 | signal: Extend exec_id to 64bits
Replace the 32bit exec_id with a 64bit exec_id to make it impossible
to wrap the exec_id counter. With care an attacker can cause exec_id
wrap and send arbitrary signals to a newly exec'd parent. This
bypasses the signal sending checks if the parent changes their
credentials during e... |
static int mailimf_no_fold_quote_char_parse(const char * message, size_t length,
size_t * indx, char * result)
{
char ch;
size_t cur_token;
int r;
cur_token = * indx;
#if 0
r = mailimf_qtext_parse(message, length, &cur_token, &ch);
#endif
if (cur_token >= length)
return MAILIMF_ERROR_PARSE;
... | 0 | [
"CWE-476"
] | libetpan | 1fe8fbc032ccda1db9af66d93016b49c16c1f22d | 80,339,205,694,224,860,000,000,000,000,000,000,000 | 32 | Fixed crash #274 |
xmlXPtrStartPointFunction(xmlXPathParserContextPtr ctxt, int nargs) {
xmlXPathObjectPtr tmp, obj, point;
xmlLocationSetPtr newset = NULL;
xmlLocationSetPtr oldset = NULL;
CHECK_ARITY(1);
if ((ctxt->value == NULL) ||
((ctxt->value->type != XPATH_LOCATIONSET) &&
(ctxt->value->type != XPATH_NODESET... | 0 | [
"CWE-416"
] | libxml2 | 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e | 8,340,500,957,727,299,000,000,000,000,000,000,000 | 69 | Fix XPointer paths beginning with range-to
The old code would invoke the broken xmlXPtrRangeToFunction. range-to
isn't really a function but a special kind of location step. Remove
this function and always handle range-to in the XPath code.
The old xmlXPtrRangeToFunction could also be abused to trigger a
use-after-fr... |
static struct page *kvm_pfn_to_page(pfn_t pfn)
{
if (is_error_pfn(pfn))
return KVM_ERR_PTR_BAD_PAGE;
if (kvm_is_mmio_pfn(pfn)) {
WARN_ON(1);
return KVM_ERR_PTR_BAD_PAGE;
}
return pfn_to_page(pfn);
} | 0 | [
"CWE-399"
] | linux | 12d6e7538e2d418c08f082b1b44ffa5fb7270ed8 | 318,304,294,354,210,400,000,000,000,000,000,000,000 | 12 | KVM: perform an invalid memslot step for gpa base change
PPC must flush all translations before the new memory slot
is visible.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com> |
int inplace_cb_reply_servfail_call(struct module_env* env,
struct query_info* qinfo, struct module_qstate* qstate,
struct reply_info* rep, int rcode, struct edns_data* edns,
struct comm_reply* repinfo, struct regional* region)
{
/* We are going to servfail. Remove any potential edns options. */
if(qstate)
qstate... | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 274,983,321,523,564,770,000,000,000,000,000,000,000 | 13 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
xsltFreeStylePreComp(xsltStylePreCompPtr comp) {
if (comp == NULL)
return;
#ifdef XSLT_REFACTORED
/*
* URGENT TODO: Implement destructors.
*/
switch (comp->type) {
case XSLT_FUNC_LITERAL_RESULT_ELEMENT:
break;
case XSLT_FUNC_COPY:
break;
case XSLT_FUNC_SORT: {
xsltStyle... | 0 | [] | libxslt | 7ca19df892ca22d9314e95d59ce2abdeff46b617 | 202,717,864,239,940,900,000,000,000,000,000,000,000 | 132 | Fix for type confusion in preprocessing attributes
CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
We need to check that the parent node is an element before dereferencing
its namespace |
virDomainUpdateDeviceFlags(virDomainPtr domain,
const char *xml, unsigned int flags)
{
virConnectPtr conn;
VIR_DOMAIN_DEBUG(domain, "xml=%s, flags=%x", xml, flags);
virResetLastError();
virCheckDomainReturn(domain, -1);
conn = domain->conn;
virCheckNonNullArgGoto(x... | 0 | [
"CWE-254"
] | libvirt | 506e9d6c2d4baaf580d489fff0690c0ff2ff588f | 36,100,449,350,173,246,000,000,000,000,000,000,000 | 29 | virDomainGetTime: Deny on RO connections
We have a policy that if API may end up talking to a guest agent
it should require RW connection. We don't obey the rule in
virDomainGetTime().
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> |
elog_start(const char *filename, int lineno, const char *funcname)
{
ErrorData *edata;
/* Make sure that memory context initialization has finished */
if (ErrorContext == NULL)
{
/* Ooops, hard crash time; very little we can do safely here */
write_stderr("error occurred at %s:%d before error message processi... | 0 | [
"CWE-89"
] | postgres | 2b3a8b20c2da9f39ffecae25ab7c66974fbc0d3b | 280,797,201,825,687,070,000,000,000,000,000,000,000 | 45 | Be more careful to not lose sync in the FE/BE protocol.
If any error occurred while we were in the middle of reading a protocol
message from the client, we could lose sync, and incorrectly try to
interpret a part of another message as a new protocol message. That will
usually lead to an "invalid frontend message" erro... |
BitWriter::BitWriter(Pipeline* pl) :
pl(pl),
ch(0),
bit_offset(7)
{
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 12,204,603,976,532,978,000,000,000,000,000,000,000 | 6 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
static ssize_t aio_poll(struct aio_kiocb *aiocb, const struct iocb *iocb)
{
struct kioctx *ctx = aiocb->ki_ctx;
struct poll_iocb *req = &aiocb->poll;
struct aio_poll_table apt;
__poll_t mask;
/* reject any unknown events outside the normal event mask. */
if ((u16)iocb->aio_buf != iocb->aio_buf)
return -EINVAL;... | 1 | [
"CWE-416"
] | linux | 84c4e1f89fefe70554da0ab33be72c9be7994379 | 43,384,849,729,283,500,000,000,000,000,000,000,000 | 71 | aio: simplify - and fix - fget/fput for io_submit()
Al Viro root-caused a race where the IOCB_CMD_POLL handling of
fget/fput() could cause us to access the file pointer after it had
already been freed:
"In more details - normally IOCB_CMD_POLL handling looks so:
1) io_submit(2) allocates aio_kiocb instance and p... |
static int dissect_CPMCiState(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, gboolean in, void *data _U_)
{
gint offset = 16;
proto_item *item;
proto_tree *tree;
col_append_str(pinfo->cinfo, COL_INFO, "CiState");
if (!in) {
item = proto_tree_add_item(parent_tree, hf_mswsp_msg, tvb, offset, -1, ENC... | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 220,484,476,555,628,560,000,000,000,000,000,000,000 | 44 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
peer_weight_set_vty (struct vty *vty, const char *ip_str,
const char *weight_str)
{
int ret;
struct peer *peer;
unsigned long weight;
peer = peer_and_group_lookup_vty (vty, ip_str);
if (! peer)
return CMD_WARNING;
VTY_GET_INTEGER_RANGE("weight", weight, weight_str, 0, 65535);
... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 129,904,982,377,426,010,000,000,000,000,000,000,000 | 17 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static inline u8 skb_metadata_len(const struct sk_buff *skb)
{
return skb_shinfo(skb)->meta_len; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 334,847,646,351,205,540,000,000,000,000,000,000,000 | 4 | net: create skb_gso_validate_mac_len()
If you take a GSO skb, and split it into packets, will the MAC
length (L2 + L3 + L4 headers + payload) of those packets be small
enough to fit within a given length?
Move skb_gso_mac_seglen() to skbuff.h with other related functions
like skb_gso_network_seglen() so we can use it... |
SELECT_LEX::attach_selects_chain(SELECT_LEX *first_sel,
Name_resolution_context *context)
{
SELECT_LEX_UNIT *unit;
DBUG_ENTER("SELECT_LEX::attach_select_chain");
if (!(unit= parent_lex->alloc_unit()))
DBUG_RETURN(NULL);
unit->register_select_chain(first_sel);
register_un... | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 110,807,653,301,470,450,000,000,000,000,000,000,000 | 21 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
void CLASS panasonic_load_raw()
{
int row, col, i, j, sh = 0, pred[2], nonz[2];
unsigned bytes[16];
ushort *raw_block_data;
int enc_blck_size = pana_bpp == 12 ? 10 : 9;
pana_data(0, 0);
if (pana_encoding == 5)
{
for (row = 0; row < raw_height; row++)
{
raw_block_data = raw_image + row * raw... | 0 | [
"CWE-190"
] | LibRaw | 4554e24ce24beaef5d0ef48372801cfd91039076 | 237,270,657,083,142,350,000,000,000,000,000,000,000 | 81 | parse_qt: possible integer overflow |
char *iscsi_get_ipaddress_state_name(enum iscsi_ipaddress_state port_state)
{
int i;
char *state = NULL;
for (i = 0; i < ARRAY_SIZE(iscsi_ipaddress_state_names); i++) {
if (iscsi_ipaddress_state_names[i].value == port_state) {
state = iscsi_ipaddress_state_names[i].name;
break;
}
}
return state; | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 256,950,459,092,192,080,000,000,000,000,000,000,000 | 13 | scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE
As the iSCSI parameters are exported back through sysfs, it should be
enforcing that they never are more than PAGE_SIZE (which should be more
than enough) before accepting updates through netlink.
Change all iSCSI sysfs attributes to use sysfs_emit().
Cc:... |
bcf_hdr_t *bcf_hdr_merge(bcf_hdr_t *dst, const bcf_hdr_t *src)
{
if ( !dst )
{
// this will effectively strip existing IDX attributes from src to become dst
dst = bcf_hdr_init("r");
kstring_t htxt = {0,0,0};
bcf_hdr_format(src, 0, &htxt);
if ( bcf_hdr_parse(dst, htxt.s) <... | 0 | [
"CWE-787"
] | htslib | dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c | 197,936,543,542,495,550,000,000,000,000,000,000,000 | 89 | Fix check for VCF record size
The check for excessive record size in vcf_parse_format() only
looked at individual fields. It was therefore possible to
exceed the limit and overflow fmt_aux_t::offset by having
multiple fields with a combined size that went over INT_MAX.
Fix by including the amount of memory used so fa... |
handle_child_line(const char *line, void *data)
{
UNUSED(data);
const char *val;
char buf[1024];
if (str_startswith(line, "Class:"))
{
val = line + sizeof("Class:");
/* Skip whitespace and second Class: occurrence */
val += strspn(val, " \t") + sizeof("Class");
current_device.klass = strtol(val, NULL, 16)... | 0 | [
"CWE-119",
"CWE-125",
"CWE-703",
"CWE-787"
] | rdesktop | 4dca546d04321a610c1835010b5dad85163b65e1 | 255,792,177,635,972,230,000,000,000,000,000,000,000 | 62 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix ... |
virtual enum_field_types type() const
{
return type_handler()->field_type();
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 113,514,295,030,887,780,000,000,000,000,000,000,000 | 4 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn)
{
int i;
struct kvm_memslots *slots = kvm_memslots(kvm);
for (i = 0; i < KVM_MEMORY_SLOTS; ++i) {
struct kvm_memory_slot *memslot = &slots->memslots[i];
if (memslot->flags & KVM_MEMSLOT_INVALID)
continue;
if (gfn >= memslot->base_gfn
&& gfn < memsl... | 0 | [
"CWE-20",
"CWE-787"
] | linux | fa3d315a4ce2c0891cdde262562e710d95fba19e | 56,902,198,810,459,700,000,000,000,000,000,000,000 | 17 | KVM: Validate userspace_addr of memslot when registered
This way, we can avoid checking the user space address many times when
we read the guest memory.
Although we can do the same for write if we check which slots are
writable, we do not care write now: reading the guest memory happens
more often than writing.
[avi... |
TEST_F(QuotedString_ExtractFrom_Tests, SingleQuotedStringWithTrailing) {
whenInputIs("'hello' world");
resultMustBe("hello");
trailingMustBe(" world");
} | 0 | [
"CWE-415",
"CWE-119"
] | ArduinoJson | 5e7b9ec688d79e7b16ec7064e1d37e8481a31e72 | 236,885,494,054,899,900,000,000,000,000,000,000,000 | 6 | Fix buffer overflow (pull request #81) |
static int nft_dump_stats(struct sk_buff *skb, struct nft_stats __percpu *stats)
{
struct nft_stats *cpu_stats, total;
struct nlattr *nest;
unsigned int seq;
u64 pkts, bytes;
int cpu;
if (!stats)
return 0;
memset(&total, 0, sizeof(total));
for_each_possible_cpu(cpu) {
cpu_stats = per_cpu_ptr(stats, cpu);
... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 248,086,647,249,984,180,000,000,000,000,000,000,000 | 38 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
sec_init(uint32 flags, int maxlen)
{
int hdrlen;
STREAM s;
if (!g_licence_issued && !g_licence_error_result)
hdrlen = (flags & SEC_ENCRYPT) ? 12 : 4;
else
hdrlen = (flags & SEC_ENCRYPT) ? 12 : 0;
s = mcs_init(maxlen + hdrlen);
s_push_layer(s, sec_hdr, hdrlen);
return s;
} | 0 | [
"CWE-787"
] | rdesktop | 766ebcf6f23ccfe8323ac10242ae6e127d4505d2 | 60,203,878,672,481,630,000,000,000,000,000,000,000 | 14 | Malicious RDP server security fixes
This commit includes fixes for a set of 21 vulnerabilities in
rdesktop when a malicious RDP server is used.
All vulnerabilities was identified and reported by Eyal Itkin.
* Add rdp_protocol_error function that is used in several fixes
* Refactor of process_bitmap_updates
* Fix pos... |
void ActiveStreamDecoderFilter::encodeMetadata(MetadataMapPtr&& metadata_map_ptr) {
parent_.encodeMetadata(nullptr, std::move(metadata_map_ptr));
} | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 199,988,887,345,875,960,000,000,000,000,000,000,000 | 3 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static MagickBooleanType InvokePostscriptDelegate(
const MagickBooleanType verbose,const char *command,char *message,
ExceptionInfo *exception)
{
int
status;
#if defined(MAGICKCORE_GS_DELEGATE) || defined(MAGICKCORE_WINDOWS_SUPPORT)
#define SetArgsStart(command,args_start) \
if (args_start == (const char *... | 0 | [
"CWE-787"
] | ImageMagick | 34a6a5a45e83a4af852090b4e43f168a380df979 | 22,566,118,596,517,054,000,000,000,000,000,000,000 | 140 | https://github.com/ImageMagick/ImageMagick/issues/1523 |
ebt_dev_check(const char *entry, const struct net_device *device)
{
int i = 0;
const char *devname;
if (*entry == '\0')
return 0;
if (!device)
return 1;
devname = device->name;
/* 1 is the wildcard token */
while (entry[i] != '\0' && entry[i] != 1 && entry[i] == devname[i])
i++;
return devname[i] != entr... | 0 | [
"CWE-787"
] | linux | b71812168571fa55e44cdd0254471331b9c4c4c6 | 204,937,309,279,526,640,000,000,000,000,000,000,000 | 15 | netfilter: ebtables: CONFIG_COMPAT: don't trust userland offsets
We need to make sure the offsets are not out of range of the
total size.
Also check that they are in ascending order.
The WARN_ON triggered by syzkaller (it sets panic_on_warn) is
changed to also bail out, no point in continuing parsing.
Briefly tested... |
static void vnc_display_close(VncDisplay *vd)
{
if (!vd) {
return;
}
vd->is_unix = false;
if (vd->listener) {
qio_net_listener_disconnect(vd->listener);
object_unref(OBJECT(vd->listener));
}
vd->listener = NULL;
if (vd->wslistener) {
qio_net_listener_disconn... | 0 | [
"CWE-401"
] | qemu | 6bf21f3d83e95bcc4ba35a7a07cc6655e8b010b0 | 180,271,673,150,386,700,000,000,000,000,000,000,000 | 44 | vnc: fix memory leak when vnc disconnect
Currently when qemu receives a vnc connect, it creates a 'VncState' to
represent this connection. In 'vnc_worker_thread_loop' it creates a
local 'VncState'. The connection 'VcnState' and local 'VncState' exchange
data in 'vnc_async_encoding_start' and 'vnc_async_encoding_end'.
... |
static gboolean prplcb_xfer_new_send_cb(gpointer data, gint fd, b_input_condition cond)
{
PurpleXfer *xfer = data;
struct im_connection *ic = purple_ic_by_pa(xfer->account);
struct prpl_xfer_data *px = xfer->ui_data;
PurpleBuddy *buddy;
const char *who;
buddy = purple_find_buddy(xfer->account, xfer->who);
who =... | 1 | [
"CWE-476"
] | bitlbee | 30d598ce7cd3f136ee9d7097f39fa9818a272441 | 300,108,127,090,163,640,000,000,000,000,000,000,000 | 23 | purple: Fix crash on ft requests from unknown contacts
Followup to 701ab81 (included in 3.5) which was a partial fix which only
improved things for non-libpurple file transfers (that is, just jabber) |
static ssize_t store_rxbuf(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t len)
{
char *endp;
if (!capable(CAP_NET_ADMIN))
return -EPERM;
simple_strtoul(buf, &endp, 0);
if (endp == buf)
return -EBADMSG;
/* rxbuf_min and rxbuf_max are no longer configurable. */
return... | 0 | [] | linux | f63c2c2032c2e3caad9add3b82cc6e91c376fd26 | 142,383,991,421,986,500,000,000,000,000,000,000,000 | 17 | xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses()
The commit referenced below moved the invocation past the "next" label,
without any explanation. In fact this allows misbehaving backends undue
control over the domain the frontend runs in, as earlier detected errors
require the skb to not ... |
std::vector<uint8_t> _binDataVector() const {
if (binDataType() != ByteArrayDeprecated) {
return std::vector<uint8_t>(reinterpret_cast<const uint8_t*>(value()) + 5,
reinterpret_cast<const uint8_t*>(value()) + 5 +
... | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 301,171,292,315,050,300,000,000,000,000,000,000,000 | 12 | SERVER-38984 Validate unique User ID on UserCache hit |
static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
MOVFragment *frag = &c->fragment;
AVStream *st = NULL;
MOVStreamContext *sc;
MOVStts *ctts_data;
uint64_t offset;
int64_t dts;
int data_offset = 0;
unsigned entries, first_sample_flags = frag->flags;
int flags, ... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 689e59b7ffed34eba6159dcc78e87133862e3746 | 181,672,557,320,976,430,000,000,000,000,000,000,000 | 95 | mov: reset dref_count on realloc to keep values consistent.
This fixes a potential crash.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
void driver_deferred_probe_del(struct device *dev)
{
mutex_lock(&deferred_probe_mutex);
if (!list_empty(&dev->p->deferred_probe)) {
dev_dbg(dev, "Removed from deferred list\n");
list_del_init(&dev->p->deferred_probe);
kfree(dev->p->deferred_probe_reason);
dev->p->deferred_probe_reason = NULL;
}
mutex_unlock... | 0 | [
"CWE-787"
] | linux | aa838896d87af561a33ecefea1caa4c15a68bc47 | 279,944,498,571,111,420,000,000,000,000,000,000,000 | 11 | 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... |
bash_vi_complete (count, key)
int count, key;
{
#if defined (SPECIFIC_COMPLETION_FUNCTIONS)
int p, r;
char *t;
if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
{
if (!whitespace (rl_line_buffer[rl_point + 1]))
rl_vi_end_word (1, 'E');
rl_point++;
}
/* Find boundar... | 0 | [
"CWE-273",
"CWE-787"
] | bash | 951bdaad7a18cc0dc1036bba86b18b90874d39ff | 139,310,507,451,300,940,000,000,000,000,000,000,000 | 49 | commit bash-20190628 snapshot |
HttpTransact::CallOSDNSLookup(State* s)
{
TRANSACT_RETURN(SM_ACTION_DNS_LOOKUP, OSDNSLookup);
} | 0 | [
"CWE-119"
] | trafficserver | 8b5f0345dade6b2822d9b52c8ad12e63011a5c12 | 221,060,593,933,908,030,000,000,000,000,000,000,000 | 4 | Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug |
struct vfsmount *clone_private_mount(struct path *path)
{
struct mount *old_mnt = real_mount(path->mnt);
struct mount *new_mnt;
if (IS_MNT_UNBINDABLE(old_mnt))
return ERR_PTR(-EINVAL);
down_read(&namespace_sem);
new_mnt = clone_mnt(old_mnt, path->dentry, CL_PRIVATE);
up_read(&namespace_sem);
if (IS_ERR(new_m... | 0 | [
"CWE-703"
] | linux | cd4a40174b71acd021877341684d8bb1dc8ea4ae | 205,452,258,766,211,870,000,000,000,000,000,000,000 | 16 | mnt: Fail collect_mounts when applied to unmounted mounts
The only users of collect_mounts are in audit_tree.c
In audit_trim_trees and audit_add_tree_rule the path passed into
collect_mounts is generated from kern_path passed an audit_tree
pathname which is guaranteed to be an absolute path. In those cases
collect_... |
inline void SetActivationParams(int64_t min, int64_t max, P* params) {
params->int64_activation_min = min;
params->int64_activation_max = max;
} | 0 | [
"CWE-125",
"CWE-787"
] | tensorflow | 8ee24e7949a203d234489f9da2c5bf45a7d5157d | 180,710,984,584,222,840,000,000,000,000,000,000,000 | 4 | [tflite] Ensure `MatchingDim` does not allow buffer overflow.
We check in `MatchingDim` that both arguments have the same dimensionality, however that is a `DCHECK` only enabled if building in debug mode. Hence, it could be possible to cause buffer overflows by passing in a tensor with larger dimensions as the second ... |
String *Field_tiny::val_str(String *val_buffer,
String *val_ptr __attribute__((unused)))
{
ASSERT_COLUMN_MARKED_FOR_READ;
CHARSET_INFO *cs= &my_charset_numeric;
uint length;
uint mlength=MY_MAX(field_length+1,5*cs->mbmaxlen);
val_buffer->alloc(mlength);
char *to=(char*) val_buffer->ptr();
if (unsi... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 40,776,718,314,090,867,000,000,000,000,000,000,000 | 23 | MDEV-25317 Assertion `scale <= precision' failed in decimal_bin_size And Assertion `scale >= 0 && precision > 0 && scale <= precision' failed in decimal_bin_size_inline/decimal_bin_size.
Precision should be kept below DECIMAL_MAX_SCALE for computations.
It can be bigger in Item_decimal. I'd fix this too but it changes... |
static noinline_for_stack int scrub_stripe(struct scrub_ctx *sctx,
struct map_lookup *map,
struct btrfs_device *scrub_dev,
int num, u64 base, u64 length)
{
struct btrfs_path *path, *ppath;
struct btrfs_fs_info *fs_info = sctx->fs_info;
struct btrfs_root *root = fs_info->extent_root;
struct b... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 313,821,374,870,422,300,000,000,000,000,000,000,000 | 372 | btrfs: merge btrfs_find_device and find_device
Both btrfs_find_device() and find_device() does the same thing except
that the latter does not take the seed device onto account in the device
scanning context. We can merge them.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.c... |
static void vmx_decache_cr0_guest_bits(struct kvm_vcpu *vcpu)
{
ulong cr0_guest_owned_bits = vcpu->arch.cr0_guest_owned_bits;
vcpu->arch.cr0 &= ~cr0_guest_owned_bits;
vcpu->arch.cr0 |= vmcs_readl(GUEST_CR0) & cr0_guest_owned_bits;
} | 0 | [
"CWE-400"
] | linux-2.6 | 9581d442b9058d3699b4be568b6e5eae38a41493 | 335,505,470,414,059,340,000,000,000,000,000,000,000 | 7 | KVM: Fix fs/gs reload oops with invalid ldt
kvm reloads the host's fs and gs blindly, however the underlying segment
descriptors may be invalid due to the user modifying the ldt after loading
them.
Fix by using the safe accessors (loadsegment() and load_gs_index()) instead
of home grown unsafe versions.
This is CVE-... |
uint64_t ldq_phys(AddressSpace *as, hwaddr addr)
{
return ldq_phys_internal(as, addr, DEVICE_NATIVE_ENDIAN);
} | 0 | [] | qemu | c3c1bb99d1c11978d9ce94d1bdcf0705378c1459 | 314,073,697,390,794,330,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... |
_krb5_get_ad(krb5_context context,
const AuthorizationData *ad,
krb5_keyblock *sessionkey,
int type,
krb5_data *data)
{
krb5_boolean found = FALSE;
krb5_error_code ret;
krb5_data_zero(data);
if (ad == NULL) {
krb5_set_error_message(context, ENOENT,
N_("No authorizati... | 0 | [
"CWE-345"
] | heimdal | 6dd3eb836bbb80a00ffced4ad57077a1cdf227ea | 25,117,174,865,999,816,000,000,000,000,000,000,000 | 28 | CVE-2017-11103: Orpheus' Lyre KDC-REP service name validation
In _krb5_extract_ticket() the KDC-REP service name must be obtained from
encrypted version stored in 'enc_part' instead of the unencrypted version
stored in 'ticket'. Use of the unecrypted version provides an
opportunity for successful server impersonation... |
TEST(IndexBoundsBuilderTest, InWithNumberAndStringAndCollatorIsExact) {
CollatorInterfaceMock collator(CollatorInterfaceMock::MockType::kReverseString);
auto testIndex = buildSimpleIndexEntry();
testIndex.collator = &collator;
BSONObj obj = fromjson("{a: {$in: [2, 'foo']}}");
auto expr = parseMatch... | 0 | [
"CWE-754"
] | mongo | f8f55e1825ee5c7bdb3208fc7c5b54321d172732 | 312,856,159,673,412,400,000,000,000,000,000,000,000 | 22 | SERVER-44377 generate correct plan for indexed inequalities to null |
int gdImageBrightness(gdImagePtr src, int brightness)
{
int x, y;
int r,g,b,a;
int new_pxl, pxl;
typedef int (*FuncPtr)(gdImagePtr, int, int);
FuncPtr f;
f = GET_PIXEL_FUNCTION(src);
if (src==NULL || (brightness < -255 || brightness>255)) {
return 0;
}
if (brightness==0) {
return 1;
}
for (y=0; y<sr... | 0 | [
"CWE-119"
] | php-src | feba44546c27b0158f9ac20e72040a224b918c75 | 115,444,558,850,852,020,000,000,000,000,000,000,000 | 45 | Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()). |
static int netsnmp_session_set_security(struct snmp_session *session, char *sec_level, char *auth_protocol, char *auth_passphrase, char *priv_protocol, char *priv_passphrase, char *contextName, char *contextEngineID)
{
/* Setting the security level. */
if (netsnmp_session_set_sec_level(session, sec_level)) {
php_e... | 0 | [
"CWE-20"
] | php-src | 6e25966544fb1d2f3d7596e060ce9c9269bbdcf8 | 284,287,370,422,729,960,000,000,000,000,000,000,000 | 52 | Fixed bug #71704 php_snmp_error() Format String Vulnerability |
static void igmp_ifc_start_timer(struct in_device *in_dev, int delay)
{
int tv = net_random() % delay;
if (!mod_timer(&in_dev->mr_ifc_timer, jiffies+tv+2))
in_dev_hold(in_dev);
} | 0 | [
"CWE-399",
"CWE-703",
"CWE-369"
] | linux | a8c1f65c79cbbb2f7da782d4c9d15639a9b94b27 | 112,503,071,114,630,000,000,000,000,000,000,000,000 | 7 | igmp: Avoid zero delay when receiving odd mixture of IGMP queries
Commit 5b7c84066733c5dfb0e4016d939757b38de189e4 ('ipv4: correct IGMP
behavior on v3 query during v2-compatibility mode') added yet another
case for query parsing, which can result in max_delay = 0. Substitute
a value of 1, as in the usual v3 case.
Rep... |
TRIO_PUBLIC int trio_fscanfv TRIO_ARGS3((file, format, args), FILE* file, TRIO_CONST char* format,
trio_pointer_t* args)
{
static va_list unused;
assert(VALID(file));
assert(VALID(format));
return TrioScan((trio_pointer_t)file, 0, TrioInStreamFile, TrioUndoStreamFile, forma... | 0 | [
"CWE-190",
"CWE-125"
] | FreeRDP | 05cd9ea2290d23931f615c1b004d4b2e69074e27 | 53,915,628,775,311,800,000,000,000,000,000,000,000 | 11 | Fixed TrioParse and trio_length limts.
CVE-2020-4030 thanks to @antonio-morales for finding this. |
static int synic_set_irq(struct kvm_vcpu_hv_synic *synic, u32 sint)
{
struct kvm_vcpu *vcpu = hv_synic_to_vcpu(synic);
struct kvm_lapic_irq irq;
int ret, vector;
if (KVM_BUG_ON(!lapic_in_kernel(vcpu), vcpu->kvm))
return -EINVAL;
if (sint >= ARRAY_SIZE(synic->sint))
return -EINVAL;
vector = synic_get_sint_v... | 0 | [
"CWE-476"
] | linux | 7ec37d1cbe17d8189d9562178d8b29167fe1c31a | 168,165,220,318,700,270,000,000,000,000,000,000,000 | 27 | KVM: x86: Check lapic_in_kernel() before attempting to set a SynIC irq
When KVM_CAP_HYPERV_SYNIC{,2} is activated, KVM already checks for
irqchip_in_kernel() so normally SynIC irqs should never be set. It is,
however, possible for a misbehaving VMM to write to SYNIC/STIMER MSRs
causing erroneous behavior.
The immedi... |
ngx_gmtime(time_t t, ngx_tm_t *tp)
{
ngx_int_t yday;
ngx_uint_t n, sec, min, hour, mday, mon, year, wday, days, leap;
/* the calculation is valid for positive time_t only */
n = (ngx_uint_t) t;
days = n / 86400;
/* January 1, 1970 was Thursday */
wday = (4 + days) % 7;
n %= 8640... | 1 | [
"CWE-190"
] | nginx | 0206ebe76f748bb39d9de4dd4b3fce777fdfdccf | 57,982,225,550,842,120,000,000,000,000,000,000,000 | 90 | Fixed ngx_gmtime() on 32-bit platforms with 64-bit time_t.
In ngx_gmtime(), instead of casting to ngx_uint_t we now work with
time_t directly. This allows using dates after 2038 on 32-bit platforms
which use 64-bit time_t, notably NetBSD and OpenBSD.
As the code is not able to work with negative time_t values, argum... |
static void trigger_event(struct work_struct *work)
{
struct multipath *m =
container_of(work, struct multipath, trigger_event);
dm_table_event(m->ti->table);
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | ec8013beddd717d1740cfefb1a9b900deef85462 | 85,261,551,431,017,280,000,000,000,000,000,000,000 | 7 | dm: do not forward ioctls from logical volumes to the underlying device
A logical volume can map to just part of underlying physical volume.
In this case, it must be treated like a partition.
Based on a patch from Alasdair G Kergon.
Cc: Alasdair G Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
Signed-off-by: Paolo ... |
bool DocumentSourceGroup::pathIncludedInGroupKeys(const std::string& dottedPath) const {
return std::any_of(
_idExpressions.begin(), _idExpressions.end(), [&dottedPath](const auto& exp) {
if (auto fieldExp = dynamic_cast<ExpressionFieldPath*>(exp.get())) {
if (fieldExp->represent... | 0 | [] | mongo | 14784757ff5e983ea40b21c14e661aba81dfc083 | 284,254,471,848,895,600,000,000,000,000,000,000,000 | 11 | SERVER-60218 add initialize helper function for document_source_group
(cherry picked from commit 867f52afbb79bc00e35c70f8e0681b7d602f97b2) |
static void* OGRExpatRealloc( void *ptr, size_t size )
{
if( CanAlloc(size) )
return realloc(ptr, size);
free(ptr);
return nullptr;
} | 1 | [
"CWE-415"
] | gdal | 148115fcc40f1651a5d15fa34c9a8c528e7147bb | 334,533,428,612,539,370,000,000,000,000,000,000,000 | 8 | OGRExpatRealloc(): fix double-free when size to allocate is above the default 10MB threshold. Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=16178. Credit to OSS Fuzz |
void Compute(OpKernelContext* ctx) override {
StagingMap<Ordered>* map = nullptr;
OP_REQUIRES_OK(ctx, GetStagingMap(ctx, def(), &map));
core::ScopedUnref scope(map);
// Pop a random (key, value) off the map
typename StagingMap<Ordered>::KeyType key;
typename StagingMap<Ordered>::Tuple tuple;
... | 0 | [
"CWE-20",
"CWE-476"
] | tensorflow | d7de67733925de196ec8863a33445b73f9562d1d | 321,912,829,657,682,600,000,000,000,000,000,000,000 | 27 | Prevent a CHECK-fail due to empty tensor input in `map_stage_op.cc`
PiperOrigin-RevId: 387737906
Change-Id: Idc52df0c71c7ed6e2dd633b651a581932f277c8a |
rfbClientIteratorHead(rfbClientIteratorPtr i)
{
LOCK(rfbClientListMutex);
i->next = i->screen->rfbClientHead;
UNLOCK(rfbClientListMutex);
return i->next;
} | 0 | [
"CWE-119"
] | vino | dff52694a384fe95195f2211254026b752d63ec4 | 314,812,716,039,962,900,000,000,000,000,000,000,000 | 7 | Avoid out-of-bounds memory accesses
This fixes two critical security vulnerabilities that lead to an
out-of-bounds memory access with a crafted client framebuffer update
request packet. The dimensions of the update from the packet are checked
to ensure that they are within the screen dimensions.
Thanks to Kevin Chen ... |
bool Chapter::Display::set_country(const char* country) {
return StrCpy(country, &country_);
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 14,458,725,367,366,660,000,000,000,000,000,000,000 | 3 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
static void FreeNodes(IntervalTree *node)
{
if (node == (IntervalTree *) NULL)
return;
FreeNodes(node->sibling);
FreeNodes(node->child);
node=(IntervalTree *) RelinquishMagickMemory(node);
} | 0 | [
"CWE-369"
] | ImageMagick | a4c89f2a61069ad7637bc7749cc1a839de442526 | 186,817,593,579,884,360,000,000,000,000,000,000,000 | 8 | https://github.com/ImageMagick/ImageMagick/issues/1730 |
int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from)
{
if (copy_from_user(to, from, 3*sizeof(int)) ||
copy_from_user(to->_sifields._pad,
from->_sifields._pad, SI_PAD_SIZE32))
return -EFAULT;
return 0;
} | 0 | [
"CWE-20",
"CWE-284",
"CWE-369"
] | linux | d2b9d2a5ad5ef04ff978c9923d19730cb05efd55 | 222,002,188,577,416,170,000,000,000,000,000,000,000 | 9 | powerpc/tm: Block signal return setting invalid MSR state
Currently we allow both the MSR T and S bits to be set by userspace on
a signal return. Unfortunately this is a reserved configuration and
will cause a TM Bad Thing exception if attempted (via rfid).
This patch checks for this case in both the 32 and 64 bit s... |
virtual ~LEX()
{
free_set_stmt_mem_root();
destroy_query_tables_list();
plugin_unlock_list(NULL, (plugin_ref *)plugins.buffer, plugins.elements);
delete_dynamic(&plugins);
} | 0 | [
"CWE-703"
] | server | 39feab3cd31b5414aa9b428eaba915c251ac34a2 | 127,089,666,887,227,340,000,000,000,000,000,000,000 | 7 | MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT
IF an INSERT/REPLACE SELECT statement contained an ON expression in the top
level select and this expression used a subquery with a column reference
that could not be resolved then an attempt to resolve this reference as
an outer reference caused... |
MSG_PROCESS_RETURN ossl_statem_client_process_message(SSL *s, PACKET *pkt)
{
OSSL_STATEM *st = &s->statem;
switch (st->hand_state) {
default:
/* Shouldn't happen */
SSLfatal(s, SSL_AD_INTERNAL_ERROR, ERR_R_INTERNAL_ERROR);
return MSG_PROCESS_ERROR;
case TLS_ST_CR_SRVR_HELLO:
... | 0 | [
"CWE-835"
] | openssl | 758754966791c537ea95241438454aa86f91f256 | 314,065,034,992,829,960,000,000,000,000,000,000,000 | 53 | Fix invalid handling of verify errors in libssl
In the event that X509_verify() returned an internal error result then
libssl would mishandle this and set rwstate to SSL_RETRY_VERIFY. This
subsequently causes SSL_get_error() to return SSL_ERROR_WANT_RETRY_VERIFY.
That return code is supposed to only ever be returned i... |
flatpak_context_reset_permissions (FlatpakContext *context)
{
context->shares_valid = 0;
context->sockets_valid = 0;
context->devices_valid = 0;
context->features_valid = 0;
context->shares = 0;
context->sockets = 0;
context->devices = 0;
context->features = 0;
g_hash_table_remove_all (context->pers... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6e5ae7a109cdfa9735ea7ccbd8cb79f9e8d3ae8b | 223,711,421,131,730,780,000,000,000,000,000,000,000 | 18 | context: Add --env-fd option
This allows environment variables to be added to the context without
making their values visible to processes running under a different uid,
which might be significant if the variable's value is a token or some
other secret value.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of... |
const MonCommand *DaemonServer::_get_mgrcommand(
const string &cmd_prefix,
const std::vector<MonCommand> &cmds)
{
const MonCommand *this_cmd = nullptr;
for (const auto &cmd : cmds) {
if (cmd.cmdstring.compare(0, cmd_prefix.size(), cmd_prefix) == 0) {
this_cmd = &cmd;
break;
}
}
return th... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 134,539,052,548,810,060,000,000,000,000,000,000,000 | 13 | auth/cephx: add authorizer challenge
Allow the accepting side of a connection to reject an initial authorizer
with a random challenge. The connecting side then has to respond with an
updated authorizer proving they are able to decrypt the service's challenge
and that the new authorizer was produced for this specific ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.