func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static void GTextFieldSave(GTextField *gt,int utf8) {
unichar_t *ret;
char *cret;
FILE *file;
unichar_t *pt;
if ( _ggadget_use_gettext ) {
char *temp = GWidgetOpenFile8(_("Save"),NULL,"*.{txt,py}",NULL,NULL);
ret = utf82u_copy(temp);
free(temp);
} else
ret = GWidgetSaveAsFile(GStringGetReso... | 1 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 295,252,661,793,926,100,000,000,000,000,000,000,000 | 61 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
void sctp_copy_sock(struct sock *newsk, struct sock *sk,
struct sctp_association *asoc)
{
struct inet_sock *inet = inet_sk(sk);
struct inet_sock *newinet;
struct sctp_sock *sp = sctp_sk(sk);
struct sctp_endpoint *ep = sp->ep;
newsk->sk_type = sk->sk_type;
newsk->sk_bound_dev_if = sk->sk_bound_dev_if;
news... | 0 | [
"CWE-362"
] | linux | b166a20b07382b8bc1dcee2a448715c9c2c81b5b | 298,740,673,715,509,830,000,000,000,000,000,000,000 | 55 | net/sctp: fix race condition in sctp_destroy_sock
If sctp_destroy_sock is called without sock_net(sk)->sctp.addr_wq_lock
held and sp->do_auto_asconf is true, then an element is removed
from the auto_asconf_splist without any proper locking.
This can happen in the following functions:
1. In sctp_accept, if sctp_sock_m... |
SPL_METHOD(Array, __construct)
{
zval *object = getThis();
spl_array_object *intern;
zval **array;
long ar_flags = 0;
zend_class_entry *ce_get_iterator = spl_ce_Iterator;
zend_error_handling error_handling;
if (ZEND_NUM_ARGS() == 0) {
return; /* nothing to do */
}
zend_replace_error_handling(EH_THROW, spl_... | 0 | [] | php-src | a374dfab567ff7f0ab0dc150f14cc891b0340b47 | 170,937,327,734,389,100,000,000,000,000,000,000,000 | 33 | Fix bug #67492: unserialize() SPL ArrayObject / SPLObjectStorage Type Confusion |
template<typename t>
CImg<Tfloat> get_distance_dijkstra(const T& value, const CImg<t>& metric,
const bool is_high_connectivity=false) const {
CImg<T> return_path;
return get_distance_dijkstra(value,metric,is_high_connectivity,return_path); | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 313,582,578,000,474,140,000,000,000,000,000,000,000 | 5 | Fix other issues in 'CImg<T>::load_bmp()'. |
int blkid_probe_set_partitions_flags(blkid_probe pr, int flags)
{
pr->chains[BLKID_CHAIN_PARTS].flags = flags;
return 0;
} | 0 | [] | util-linux | 50d1594c2e6142a3b51d2143c74027480df082e0 | 99,808,656,878,031,900,000,000,000,000,000,000,000 | 5 | libblkid: avoid non-empty recursion in EBR
This is extension to the patch 7164a1c34d18831ac61c6744ad14ce916d389b3f.
We also need to detect non-empty recursion in the EBR chain. It's
possible to create standard valid logical partitions and in the last one
points back to the EBR chain. In this case all offsets will be ... |
sdr_convert_sensor_hysterisis(struct sdr_record_full_sensor *sensor, uint8_t val)
{
int m, k2;
double result;
m = __TO_M(sensor->mtol);
k2 = __TO_R_EXP(sensor->bacc);
switch (sensor->cmn.unit.analog) {
case 0:
result = (double) (((m * val)) * pow(10, k2));
break;
case 1:
if (val & 0x80)
val++;
/* f... | 0 | [
"CWE-120"
] | ipmitool | 7ccea283dd62a05a320c1921e3d8d71a87772637 | 140,058,736,566,887,120,000,000,000,000,000,000,000 | 65 | fru, sdr: Fix id_string buffer overflows
Final part of the fixes for CVE-2020-5208, see
https://github.com/ipmitool/ipmitool/security/advisories/GHSA-g659-9qxw-p7cp
9 variants of stack buffer overflow when parsing `id_string` field of
SDR records returned from `CMD_GET_SDR` command.
SDR record structs have an `id_co... |
check_for_list_or_blob_arg(typval_T *args, int idx)
{
if (args[idx].v_type != VAR_LIST && args[idx].v_type != VAR_BLOB)
{
semsg(_(e_list_or_blob_required_for_argument_nr), idx + 1);
return FAIL;
}
return OK;
} | 0 | [
"CWE-125",
"CWE-122"
] | vim | 1e56bda9048a9625bce6e660938c834c5c15b07d | 205,194,142,286,994,070,000,000,000,000,000,000,000 | 9 | patch 9.0.0104: going beyond allocated memory when evaluating string constant
Problem: Going beyond allocated memory when evaluating string constant.
Solution: Properly skip over <Key> form. |
static int nf_tables_getsetelem(struct sk_buff *skb,
const struct nfnl_info *info,
const struct nlattr * const nla[])
{
struct netlink_ext_ack *extack = info->extack;
u8 genmask = nft_genmask_cur(info->net);
u8 family = info->nfmsg->nfgen_family;
struct net *net = info->net;
struct nft_table *table;
struc... | 0 | [
"CWE-121"
] | linux | fecf31ee395b0295f2d7260aa29946b7605f7c85 | 292,655,980,050,355,700,000,000,000,000,000,000,000 | 56 | netfilter: nf_tables: sanitize nft_set_desc_concat_parse()
Add several sanity checks for nft_set_desc_concat_parse():
- validate desc->field_count not larger than desc->field_len array.
- field length cannot be larger than desc->field_len (ie. U8_MAX)
- total length of the concatenation cannot be larger than register... |
_nc_extend_names(ENTRY * entryp, const char *name, int token_type)
{
static struct name_table_entry temp;
TERMTYPE2 *tp = &(entryp->tterm);
unsigned offset = 0;
unsigned actual;
unsigned tindex;
unsigned first, last, n;
bool found;
switch (token_type) {
case BOOLEAN:
first = 0;
la... | 0 | [
"CWE-125"
] | ncurses | b025434573f466efe27862656a6a9d41dd2bd609 | 132,702,168,707,362,250,000,000,000,000,000,000,000 | 115 | ncurses 6.1 - patch 20191012
+ amend recent changes to ncurses*-config and pc-files to filter out
Debian linker-flags (report by Sven Joachim, cf: 20150516).
+ clarify relationship between tic, infocmp and captoinfo in manpage.
+ check for invalid hashcode in _nc_find_type_entry and
_nc_find_name_entry.
> fix seve... |
proxy_info_matches(const struct proxy_info* data,
const struct proxy_info* needle)
{
if((data->proxytype == needle->proxytype) &&
(data->port == needle->port) &&
Curl_safe_strcasecompare(data->host.name, needle->host.name))
return TRUE;
return FALSE;
} | 0 | [
"CWE-119"
] | curl | 9b5e12a5491d2e6b68e0c88ca56f3a9ef9fba400 | 340,170,889,658,126,600,000,000,000,000,000,000,000 | 10 | url: fix alignment of ssl_backend_data struct
- Align the array of ssl_backend_data on a max 32 byte boundary.
8 is likely to be ok but I went with 32 for posterity should one of
the ssl_backend_data structs change to contain a larger sized variable
in the future.
Prior to this change (since dev 70f1db3, release 7.5... |
MonoReflectionType*
mono_reflection_create_runtime_class (MonoReflectionTypeBuilder *tb)
{
MonoError error;
MonoClass *klass;
MonoDomain* domain;
MonoReflectionType* res;
int i, j;
MONO_ARCH_SAVE_REGS;
domain = mono_object_domain (tb);
klass = mono_class_from_mono_type (tb->type.type);
/*
* Check for user... | 0 | [
"CWE-20"
] | mono | 65292a69c837b8a5f7a392d34db63de592153358 | 328,711,204,187,073,570,000,000,000,000,000,000,000 | 175 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
void wc_ecc_key_free(ecc_key* key)
{
if (key) {
void* heap = key->heap;
wc_ecc_free(key);
ForceZero(key, sizeof(ecc_key));
XFREE(key, heap, DYNAMIC_TYPE_ECC);
(void)heap;
}
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 14,899,117,930,523,313,000,000,000,000,000,000,000 | 11 | 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. |
SYSCALL_DEFINE3(set_mempolicy, int, mode, const unsigned long __user *, nmask,
unsigned long, maxnode)
{
int err;
nodemask_t nodes;
unsigned short flags;
flags = mode & MPOL_MODE_FLAGS;
mode &= ~MPOL_MODE_FLAGS;
if ((unsigned int)mode >= MPOL_MAX)
return -EINVAL;
if ((flags & MPOL_F_STATIC_NODES) && (flags ... | 0 | [
"CWE-388"
] | linux | cf01fb9985e8deb25ccf0ea54d916b8871ae0e62 | 11,679,683,051,605,947,000,000,000,000,000,000,000 | 18 | mm/mempolicy.c: fix error handling in set_mempolicy and mbind.
In the case that compat_get_bitmap fails we do not want to copy the
bitmap to the user as it will contain uninitialized stack data and leak
sensitive data.
Signed-off-by: Chris Salls <salls@cs.ucsb.edu>
Signed-off-by: Linus Torvalds <torvalds@linux-founda... |
Item_args(THD *thd, List<Item> &list)
{
set_arguments(thd, list);
} | 0 | [
"CWE-617"
] | server | 2e7891080667c59ac80f788eef4d59d447595772 | 107,473,002,294,933,020,000,000,000,000,000,000,000 | 4 | MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view
This bug could manifest itself after pushing a where condition over a
mergeable derived table / view / CTE DT into a grouping view / derived
table / CTE V whose item list contained set functions with constant
arguments such as MIN(2), SUM(1) etc.... |
ecma_op_advance_string_index (ecma_string_t *str_p, /**< input string */
ecma_length_t index, /**< given character index */
bool is_unicode) /**< true - if regexp object's "unicode" flag is set
false - otherw... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 165,026,462,878,846,260,000,000,000,000,000,000,000 | 37 | Improve parse_identifier (#4691)
Ascii string length is no longer computed during string allocation.
JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com |
get_pka_info (const char *address, unsigned char *fpr)
{
#ifdef USE_ADNS
int rc;
adns_state state;
const char *domain;
char *name;
adns_answer *answer = NULL;
char *buffer = NULL;
domain = strrchr (address, '@');
if (!domain || domain == address || !domain[1])
return NULL; /* Invalid mail address g... | 1 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 297,591,469,965,569,580,000,000,000,000,000,000,000 | 160 | Use inline functions to convert buffer data to scalars.
* common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
(buf16_to_ushort, buf16_to_u16): New.
(buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
--
Commit 91b826a38880fd8a989318585eb502582636ddd8 was not enough to
avoid all sign extension on ... |
static int pin_rcv_pages(struct hfi1_filedata *fd, struct tid_user_buf *tidbuf)
{
int pinned;
unsigned int npages;
unsigned long vaddr = tidbuf->vaddr;
struct page **pages = NULL;
struct hfi1_devdata *dd = fd->uctxt->dd;
/* Get the number of pages the user buffer spans */
npages = num_user_pages(vaddr, tidbuf->... | 0 | [
"CWE-416"
] | linux | 3d2a9d642512c21a12d19b9250e7a835dcb41a79 | 325,413,275,762,162,900,000,000,000,000,000,000,000 | 43 | IB/hfi1: Ensure correct mm is used at all times
Two earlier bug fixes have created a security problem in the hfi1
driver. One fix aimed to solve an issue where current->mm was not valid
when closing the hfi1 cdev. It attempted to do this by saving a cached
value of the current->mm pointer at file open time. This is a ... |
const am_cond_t *am_cond_substitue(request_rec *r, const am_cond_t *ce,
const apr_array_header_t *backrefs)
{
am_cond_t *c;
const char *instr = ce->str;
apr_size_t inlen = strlen(instr);
const char *outstr = "";
size_t last;
size_t i;
c = (am_cond_t *)apr... | 0 | [
"CWE-284",
"CWE-601"
] | mod_auth_mellon | 62041428a32de402e0be6ba45fe12df6a83bedb8 | 167,593,364,623,249,250,000,000,000,000,000,000,000 | 153 | Fix redirect URL validation bypass
It turns out that browsers silently convert backslash characters into
forward slashes, while apr_uri_parse() does not.
This mismatch allows an attacker to bypass the redirect URL validation
by using an URL like:
https://sp.example.org/mellon/logout?ReturnTo=https:%5c%5cmalicious.... |
gst_h264_parser_insert_sei_avc (GstH264NalParser * nalparser,
guint8 nal_length_size, GstBuffer * au, GstMemory * sei)
{
g_return_val_if_fail (nalparser != NULL, NULL);
g_return_val_if_fail (nal_length_size > 0 && nal_length_size < 5, NULL);
g_return_val_if_fail (GST_IS_BUFFER (au), NULL);
g_return_val_if_f... | 0 | [
"CWE-787"
] | gst-plugins-bad | 11353b3f6e2f047cc37483d21e6a37ae558896bc | 309,804,838,420,988,400,000,000,000,000,000,000,000 | 13 | codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703> |
static int dccp_v6_init_sock(struct sock *sk)
{
static __u8 dccp_v6_ctl_sock_initialized;
int err = dccp_init_sock(sk, dccp_v6_ctl_sock_initialized);
if (err == 0) {
if (unlikely(!dccp_v6_ctl_sock_initialized))
dccp_v6_ctl_sock_initialized = 1;
inet_csk(sk)->icsk_af_ops = &dccp_ipv6_af_ops;
}
return err;
... | 0 | [
"CWE-362"
] | linux-2.6 | f6d8bd051c391c1c0458a30b2a7abcd939329259 | 309,514,383,400,539,670,000,000,000,000,000,000,000 | 13 | inet: add RCU protection to inet->opt
We lack proper synchronization to manipulate inet->opt ip_options
Problem is ip_make_skb() calls ip_setup_cork() and
ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options),
without any protection against another thread manipulating inet->opt.
Another thread can ch... |
expectation_ref_lookup_unique(const struct hindex *alg_expectation_refs,
const struct conn_key *parent_key,
const struct conn_key *alg_exp_key,
uint32_t basis)
{
struct alg_exp_node *alg_exp_node;
HINDEX_FOR_EACH_WITH_HAS... | 0 | [
"CWE-400"
] | ovs | 79349cbab0b2a755140eedb91833ad2760520a83 | 127,637,996,826,650,960,000,000,000,000,000,000,000 | 17 | flow: Support extra padding length.
Although not required, padding can be optionally added until
the packet length is MTU bytes. A packet with extra padding
currently fails sanity checks.
Vulnerability: CVE-2020-35498
Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.")
Reported-by: Joakim Hind... |
p11_rpc_buffer_get_rsa_pkcs_pss_mechanism_value (p11_buffer *buffer,
size_t *offset,
void *value,
CK_ULONG *value_length)
{
uint64_t val[3];
if (!p11_rpc_buffer_get_uint64 (buffer, offset, &val[0]))
return false;
if (!p11_rpc_buffer_get_uint64 (buffer, offset, &val[1]))
return false;
if (!... | 0 | [
"CWE-787"
] | p11-kit | 2617f3ef888e103324a28811886b99ed0a56346d | 39,987,577,261,007,800,000,000,000,000,000,000,000 | 29 | Check attribute length against buffer size
If an attribute's length does not match the length of the byte array
inside it, one length was used for allocation, and the other was used
for memcpy. This additional check will instead return an error on
malformed messages. |
void hash_preload(struct mm_struct *mm, unsigned long ea,
unsigned long access, unsigned long trap)
{
unsigned long vsid;
void *pgdir;
pte_t *ptep;
cpumask_t mask;
unsigned long flags;
int local = 0;
/* We don't want huge pages prefaulted for now
*/
if (unlikely(in_hugepage_area(mm->context, ea)))
retu... | 0 | [
"CWE-200"
] | linux-2.6 | 721151d004dcf01a71b12bb6b893f9160284cf6e | 237,904,051,414,644,420,000,000,000,000,000,000,000 | 48 | [POWERPC] Allow drivers to map individual 4k pages to userspace
Some drivers have resources that they want to be able to map into
userspace that are 4k in size. On a kernel configured with 64k pages
we currently end up mapping the 4k we want plus another 60k of
physical address space, which could contain anything. T... |
static void _gdImageGd2 (gdImagePtr im, gdIOCtx * out, int cs, int fmt)
{
int ncx, ncy, cx, cy;
int x, y, ylo, yhi, xlo, xhi;
int chunkLen;
int chunkNum = 0;
char *chunkData = NULL; /* So we can gdFree it with impunity. */
char *compData = NULL; /* So we can gdFree it with impunity. */
uLongf compLen;
int idxPo... | 0 | [
"CWE-190"
] | php-src | 7722455726bec8c53458a32851d2a87982cf0eac | 106,928,630,395,067,490,000,000,000,000,000,000,000 | 167 | Fixed #72339 Integer Overflow in _gd2GetHeader() resulting in heap overflow |
static int smack_socket_getpeersec_dgram(struct socket *sock,
struct sk_buff *skb, u32 *secid)
{
struct socket_smack *ssp = NULL;
struct smack_known *skp;
struct sock *sk = NULL;
int family = PF_UNSPEC;
u32 s = 0; /* 0 is the invalid secid */
if (skb != NULL) {
if (skb->protocol == htons(ETH_P_IP))
f... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 22,883,464,092,202,710,000,000,000,000,000,000,000 | 54 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
void line6_disconnect(struct usb_interface *interface)
{
struct usb_line6 *line6 = usb_get_intfdata(interface);
struct usb_device *usbdev = interface_to_usbdev(interface);
if (!line6)
return;
if (WARN_ON(usbdev != line6->usbdev))
return;
if (line6->urb_listen != NULL)
line6_stop_listen(line6);
snd_card_... | 1 | [
"CWE-476"
] | linux | 0b074ab7fc0d575247b9cc9f93bb7e007ca38840 | 326,204,959,221,096,060,000,000,000,000,000,000,000 | 28 | ALSA: line6: Assure canceling delayed work at disconnection
The current code performs the cancel of a delayed work at the late
stage of disconnection procedure, which may lead to the access to the
already cleared state.
This patch assures to call cancel_delayed_work_sync() at the beginning
of the disconnection proced... |
static void bootstrap_attr_stack(void)
{
if (!attr_stack) {
struct attr_stack *elem;
elem = read_attr_from_array(builtin_attr);
elem->origin = NULL;
elem->prev = attr_stack;
attr_stack = elem;
if (!is_bare_repository()) {
elem = read_attr(GITATTRIBUTES_FILE, 1);
elem->origin = strdup("");
elem->... | 0 | [] | git | f66cf96d7c613a8129436a5d76ef7b74ee302436 | 158,322,494,090,907,950,000,000,000,000,000,000,000 | 26 | Fix buffer overflow in prepare_attr_stack
If PATH_MAX on your system is smaller than a path stored in the git repo,
it may cause the buffer overflow in prepare_attr_stack.
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static int asn1_ex_c2i(ASN1_VALUE **pval, const unsigned char *cont, int len,
int utype, char *free_cont, const ASN1_ITEM *it)
{
ASN1_VALUE **opval = NULL;
ASN1_STRING *stmp;
ASN1_TYPE *typ = NULL;
int ret = 0;
const ASN1_PRIMITIVE_FUNCS *pf;
ASN1_INTEGER **tint;
pf = ... | 0 | [
"CWE-400",
"CWE-674",
"CWE-787"
] | openssl | 2ac4c6f7b2b2af20c0e2b0ba05367e454cd11b33 | 175,880,213,043,375,830,000,000,000,000,000,000,000 | 135 | Limit ASN.1 constructed types recursive definition depth
Constructed types with a recursive definition (such as can be found in
PKCS7) could eventually exceed the stack given malicious input with
excessive recursion. Therefore we limit the stack depth.
CVE-2018-0739
Credit to OSSFuzz for finding this issue.
Reviewe... |
set_verification_mode (GdmSession *self,
GdmSessionVerificationMode verification_mode)
{
self->priv->verification_mode = verification_mode;
} | 0 | [] | gdm | 5ac224602f1d603aac5eaa72e1760d3e33a26f0a | 276,131,723,347,830,640,000,000,000,000,000,000,000 | 5 | session: disconnect signals from worker proxy when conversation is freed
We don't want an outstanding reference on the worker proxy to lead to
signal handlers getting dispatched after the conversation is freed.
https://bugzilla.gnome.org/show_bug.cgi?id=758032 |
my_decimal *Aggregator_simple::arg_val_decimal(my_decimal *value)
{
return item_sum->args[0]->val_decimal(value);
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 187,579,503,073,556,100,000,000,000,000,000,000,000 | 4 | 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... |
capture_tcp(const guchar *pd, int offset, int len, capture_packet_info_t *cpinfo, const union wtap_pseudo_header *pseudo_header)
{
guint16 src_port, dst_port, low_port, high_port;
if (!BYTES_ARE_IN_FRAME(offset, len, 4))
return FALSE;
capture_dissector_increment_count(cpinfo, proto_tcp);
src_... | 0 | [
"CWE-354"
] | wireshark | 7f3fe6164a68b76d9988c4253b24d43f498f1753 | 248,492,652,865,244,420,000,000,000,000,000,000,000 | 31 | TCP: do not use an unknown status when the checksum is 0xffff
Otherwise it triggers an assert when adding the column as the field is
defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value
(not in proto_checksum_vals[)array) cannot be represented.
Mark the checksum as bad even if we process the packet... |
zrsdparams(i_ctx_t *i_ctx_p)
{
os_ptr op = osp;
ref *pFilter;
ref *pDecodeParms;
int Intent = 0;
bool AsyncRead = false;
ref empty_array, filter1_array, parms1_array;
uint i;
int code = 0;
if (ref_stack_count(&o_stack) < 1)
return_error(gs_error_stackunderflow);
if (!r_h... | 1 | [] | ghostpdl | ccfd2c75ac9be4cbd369e4cbdd40ba11a0c7bdad | 142,724,261,619,812,460,000,000,000,000,000,000,000 | 73 | Bug 697892: fix check for op stack underflow.
In the original fix, I used the wrong method to check for stack underflow, this
is using the correct method. |
int (*SSL_CTX_get_security_callback(const SSL_CTX *ctx))(SSL *s, SSL_CTX *ctx, int op, int bits, int nid, void *other, void *ex)
{
return ctx->cert->sec_cb;
} | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 124,779,863,779,140,980,000,000,000,000,000,000,000 | 4 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
long user_read(const struct key *key, char __user *buffer, size_t buflen)
{
const struct user_key_payload *upayload;
long ret;
upayload = user_key_payload_locked(key);
ret = upayload->datalen;
/* we can return the data as is */
if (buffer && buflen > 0) {
if (buflen > upayload->datalen)
buflen = upayload->... | 0 | [
"CWE-20"
] | linux | 363b02dab09b3226f3bd1420dad9c72b79a42a76 | 326,746,148,128,705,350,000,000,000,000,000,000,000 | 19 | KEYS: Fix race between updating and finding a negative key
Consolidate KEY_FLAG_INSTANTIATED, KEY_FLAG_NEGATIVE and the rejection
error into one field such that:
(1) The instantiation state can be modified/read atomically.
(2) The error can be accessed atomically with the state.
(3) The error isn't stored unione... |
ofputil_format_version(struct ds *msg, enum ofp_version version)
{
ds_put_format(msg, "0x%02x", version);
} | 0 | [
"CWE-772"
] | ovs | 77ad4225d125030420d897c873e4734ac708c66b | 25,253,355,048,987,434,000,000,000,000,000,000,000 | 4 | 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> |
static void __ipv6_regen_rndid(struct inet6_dev *idev)
{
regen:
get_random_bytes(idev->rndid, sizeof(idev->rndid));
idev->rndid[0] &= ~0x02;
/*
* <draft-ietf-ipngwg-temp-addresses-v2-00.txt>:
* check if generated address is not inappropriate
*
* - Reserved subnet anycast (RFC 2526)
* 11111101 11....11 1x... | 0 | [] | net | 4b08a8f1bd8cb4541c93ec170027b4d0782dab52 | 144,371,060,253,640,300,000,000,000,000,000,000,000 | 28 | ipv6: remove max_addresses check from ipv6_create_tempaddr
Because of the max_addresses check attackers were able to disable privacy
extensions on an interface by creating enough autoconfigured addresses:
<http://seclists.org/oss-sec/2012/q4/292>
But the check is not actually needed: max_addresses protects the
kerne... |
PHP_FUNCTION(imageaffine)
{
zval *IM;
gdImagePtr src;
gdImagePtr dst;
gdRect rect;
gdRectPtr pRect = NULL;
zval *z_rect = NULL;
zval *z_affine;
zval **tmp;
double affine[6];
int i, nelems;
zval **zval_affine_elem = NULL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|a", &IM, &z_affine, &z_rect) ... | 1 | [
"CWE-703",
"CWE-189"
] | php-src | 2938329ce19cb8c4197dec146c3ec887c6f61d01 | 29,929,349,571,151,976,000,000,000,000,000,000,000 | 98 | Fixed bug #66356 (Heap Overflow Vulnerability in imagecrop())
And also fixed the bug: arguments are altered after some calls |
static int ipcget_public(struct ipc_namespace *ns, struct ipc_ids *ids,
const struct ipc_ops *ops, struct ipc_params *params)
{
struct kern_ipc_perm *ipcp;
int flg = params->flg;
int err;
/*
* Take the lock as a writer since we are potentially going to add
* a new entry + read locks are not "upgradable"
*/... | 0 | [
"CWE-362",
"CWE-401"
] | linux | b9a532277938798b53178d5a66af6e2915cb27cf | 287,005,580,296,450,270,000,000,000,000,000,000,000 | 41 | Initialize msg/shm IPC objects before doing ipc_addid()
As reported by Dmitry Vyukov, we really shouldn't do ipc_addid() before
having initialized the IPC object state. Yes, we initialize the IPC
object in a locked state, but with all the lockless RCU lookup work,
that IPC object lock no longer means that the state c... |
dns_zonemgr_setsize(dns_zonemgr_t *zmgr, int num_zones) {
isc_result_t result;
int ntasks = num_zones / ZONES_PER_TASK;
int nmctx = num_zones / ZONES_PER_MCTX;
isc_taskpool_t *pool = NULL;
isc_pool_t *mctxpool = NULL;
REQUIRE(DNS_ZONEMGR_VALID(zmgr));
/*
* For anything fewer than 1000 zones we use 10 tasks i... | 0 | [
"CWE-327"
] | bind9 | f09352d20a9d360e50683cd1d2fc52ccedcd77a0 | 140,080,986,402,442,300,000,000,000,000,000,000,000 | 67 | Update keyfetch_done compute_tag check
If in keyfetch_done the compute_tag fails (because for example the
algorithm is not supported), don't crash, but instead ignore the
key. |
initializeEncoding(XML_Parser parser)
{
const char *s;
#ifdef XML_UNICODE
char encodingBuf[128];
/* See comments abount `protoclEncodingName` in parserInit() */
if (!parser->m_protocolEncodingName)
s = NULL;
else {
int i;
for (i = 0; parser->m_protocolEncodingName[i]; i++) {
if (i == sizeof(... | 0 | [
"CWE-611"
] | libexpat | 11f8838bf99ea0a6f0b76f9760c43704d00c4ff6 | 67,951,999,016,743,020,000,000,000,000,000,000,000 | 28 | xmlparse.c: Fix extraction of namespace prefix from XML name (#186) |
MenuCacheDir* menu_cache_item_get_parent( MenuCacheItem* item )
{
MenuCacheDir* dir = menu_cache_item_dup_parent(item);
/* NOTE: this is very ugly hack but parent may be changed by item freeing
so we should keep it alive :( */
if(dir)
g_timeout_add_seconds(10, (GSourceFunc)menu_cache_item_unr... | 0 | [
"CWE-20"
] | menu-cache | 56f66684592abf257c4004e6e1fff041c64a12ce | 169,220,877,038,222,500,000,000,000,000,000,000,000 | 9 | Fix potential access violation, use runtime user dir instead of tmp dir.
Note: it limits libmenu-cache compatibility to menu-cached >= 0.7.0. |
virtual void get_image(uchar *buff, uint length, CHARSET_INFO *cs)
{ memcpy(buff,ptr,length); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 184,944,546,720,200,470,000,000,000,000,000,000,000 | 2 | 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... |
CModule::EModRet CModule::OnUnknownUserRawMessage(CMessage& Message) {
return CONTINUE;
} | 0 | [
"CWE-20",
"CWE-264"
] | znc | 8de9e376ce531fe7f3c8b0aa4876d15b479b7311 | 147,771,158,228,041,000,000,000,000,000,000,000,000 | 3 | Fix remote code execution and privilege escalation vulnerability.
To trigger this, need to have a user already.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this.
CVE-2019-12816 |
void md_new_event(struct mddev *mddev)
{
atomic_inc(&md_event_count);
wake_up(&md_event_waiters);
} | 0 | [
"CWE-200"
] | linux | b6878d9e03043695dbf3fa1caa6dfc09db225b16 | 9,914,946,746,258,092,000,000,000,000,000,000,000 | 5 | md: use kzalloc() when bitmap is disabled
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".
5769 file = kmalloc(sizeof(*file), GFP_NOIO);
5770 if (!file)
5771 return -ENOMEM;
This structure is copied to user space at the end of the fun... |
int test_sub(BIO *bp)
{
BIGNUM a, b, c;
int i;
BN_init(&a);
BN_init(&b);
BN_init(&c);
for (i = 0; i < num0 + num1; i++) {
if (i < num1) {
BN_bntest_rand(&a, 512, 0, 0);
BN_copy(&b, &a);
if (BN_set_bit(&a, i) == 0)
return (0);
... | 0 | [
"CWE-200"
] | openssl | d73cc256c8e256c32ed959456101b73ba9842f72 | 300,424,922,242,379,850,000,000,000,000,000,000,000 | 44 | bn/asm/x86_64-mont5.pl: fix carry propagating bug (CVE-2015-3193).
Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit e7c078db57908cbf16074c68034977565ffaf107) |
static int napi_poll(struct napi_struct *n, struct list_head *repoll)
{
void *have;
int work, weight;
list_del_init(&n->poll_list);
have = netpoll_poll_lock(n);
weight = n->weight;
/* This NAPI_STATE_SCHED test is for avoiding a race
* with netpoll's poll_napi(). Only the entity which
* obtains the lock... | 0 | [
"CWE-400",
"CWE-703"
] | linux | fac8e0f579695a3ecbc4d3cac369139d7f819971 | 126,224,282,061,404,300,000,000,000,000,000,000,000 | 61 | tunnels: Don't apply GRO to multiple layers of encapsulation.
When drivers express support for TSO of encapsulated packets, they
only mean that they can do it for one layer of encapsulation.
Supporting additional levels would mean updating, at a minimum,
more IP length fields and they are unaware of this.
No encapsul... |
static int ftrace_module_notify_enter(struct notifier_block *self,
unsigned long val, void *data)
{
struct module *mod = data;
if (val == MODULE_STATE_COMING)
ftrace_init_module(mod, mod->ftrace_callsites,
mod->ftrace_callsites +
mod->num_ftrace_callsites);
return 0;
} | 0 | [
"CWE-703"
] | linux | 6a76f8c0ab19f215af2a3442870eeb5f0e81998d | 216,148,187,697,074,750,000,000,000,000,000,000,000 | 11 | tracing: Fix possible NULL pointer dereferences
Currently set_ftrace_pid and set_graph_function files use seq_lseek
for their fops. However seq_open() is called only for FMODE_READ in
the fops->open() so that if an user tries to seek one of those file
when she open it for writing, it sees NULL seq_file and then panic... |
int main( int argc, char *argv[] )
{
FILE *f;
int ret;
size_t i;
rsa_context rsa;
entropy_context entropy;
ctr_drbg_context ctr_drbg;
unsigned char hash[20];
unsigned char buf[POLARSSL_MPI_MAX_SIZE];
const char *pers = "rsa_decrypt";
ret = 1;
if( argc != 2 )
{
p... | 0 | [
"CWE-310"
] | polarssl | 43f9799ce61c6392a014d0a2ea136b4b3a9ee194 | 218,302,853,807,862,300,000,000,000,000,000,000,000 | 124 | RSA blinding on CRT operations to counter timing attacks |
static __cold void __io_uring_show_fdinfo(struct io_ring_ctx *ctx,
struct seq_file *m)
{
struct io_sq_data *sq = NULL;
struct io_overflow_cqe *ocqe;
struct io_rings *r = ctx->rings;
unsigned int sq_mask = ctx->sq_entries - 1, cq_mask = ctx->cq_entries - 1;
unsigned int sq_head = READ_ONCE(r->sq.head);
uns... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 38,436,407,095,236,680,000,000,000,000,000,000,000 | 131 | io_uring: reinstate the inflight tracking
After some debugging, it was realized that we really do still need the
old inflight tracking for any file type that has io_uring_fops assigned.
If we don't, then trivial circular references will mean that we never get
the ctx cleaned up and hence it'll leak.
Just bring back t... |
flatpak_run_add_app_info_args (FlatpakBwrap *bwrap,
GFile *app_files,
GBytes *app_deploy_data,
const char *app_extensions,
GFile *runtime_files,... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | 6d1773d2a54dde9b099043f07a2094a4f1c2f486 | 37,848,197,181,567,813,000,000,000,000,000,000,000 | 245 | run: Convert all environment variables into bwrap arguments
This avoids some of them being filtered out by a setuid bwrap. It also
means that if they came from an untrusted source, they cannot be used
to inject arbitrary code into a non-setuid bwrap via mechanisms like
LD_PRELOAD.
Because they get bundled into a memf... |
uint_to_str_back_len(char *ptr, guint32 value, int len)
{
char *new_ptr;
new_ptr = uint_to_str_back(ptr, value);
/* substract from len number of generated characters */
len -= (int)(ptr - new_ptr);
/* pad remaining with '0' */
while (len > 0)
{
*(--new_ptr) = '0';
len--;
}
return new_ptr;
} | 0 | [
"CWE-125"
] | wireshark | d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1 | 302,604,379,098,721,920,000,000,000,000,000,000,000 | 18 | epan: Limit our bits in decode_bits_in_field.
Limit the number of bits we process in decode_bits_in_field, otherwise
we'll overrun our buffer. Fixes #16958. |
void __init ip_static_sysctl_init(void)
{
register_net_sysctl(&init_net, "net/ipv4/route", ipv4_route_table);
} | 0 | [
"CWE-17"
] | linux | df4d92549f23e1c037e83323aff58a21b3de7fe0 | 196,540,713,683,052,120,000,000,000,000,000,000,000 | 4 | ipv4: try to cache dst_entries which would cause a redirect
Not caching dst_entries which cause redirects could be exploited by hosts
on the same subnet, causing a severe DoS attack. This effect aggravated
since commit f88649721268999 ("ipv4: fix dst race in sk_dst_get()").
Lookups causing redirects will be allocated... |
static void init_loopback(struct net_device *dev)
{
struct inet6_dev *idev;
struct inet6_ifaddr * ifp;
/* ::1 */
ASSERT_RTNL();
if ((idev = ipv6_find_idev(dev)) == NULL) {
printk(KERN_DEBUG "init loopback: add_dev failed\n");
return;
}
ifp = ipv6_add_addr(idev, &in6addr_loopback, 128, IFA_HOST, IFA_F_PE... | 0 | [
"CWE-200"
] | linux-2.6 | 8a47077a0b5aa2649751c46e7a27884e6686ccbf | 22,610,528,998,617,843,000,000,000,000,000,000,000 | 23 | [NETLINK]: Missing padding fields in dumped structures
Plug holes with padding fields and initialized them to zero.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net> |
proto_tree_add_bitmask_with_flags_ret_uint64(proto_tree *parent_tree, tvbuff_t *tvb, const guint offset,
const int hf_hdr, const gint ett, int * const *fields, const guint encoding, const int flags,
guint64 *retval)
{
proto_item *item = NULL;
header_field_info *hf;
int len;
guint64 ... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 315,063,517,807,386,020,000,000,000,000,000,000,000 | 30 | 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. |
static int rtrs_post_recv_empty_x2(struct rtrs_con *con, struct ib_cqe *cqe)
{
struct ib_recv_wr wr_arr[2], *wr;
int i;
memset(wr_arr, 0, sizeof(wr_arr));
for (i = 0; i < ARRAY_SIZE(wr_arr); i++) {
wr = &wr_arr[i];
wr->wr_cqe = cqe;
if (i)
/* Chain backwards */
wr->next = &wr_arr[i - 1];
}
return i... | 0 | [
"CWE-415"
] | linux | 8700af2cc18c919b2a83e74e0479038fd113c15d | 12,924,985,111,684,892,000,000,000,000,000,000,000 | 16 | RDMA/rtrs-clt: Fix possible double free in error case
Callback function rtrs_clt_dev_release() for put_device() calls kfree(clt)
to free memory. We shouldn't call kfree(clt) again, and we can't use the
clt after kfree too.
Replace device_register() with device_initialize() and device_add() so that
dev_set_name can() ... |
SYSCALL_DEFINE5(getsockopt, int, fd, int, level, int, optname,
char __user *, optval, int __user *, optlen)
{
return __sys_getsockopt(fd, level, optname, optval, optlen);
} | 0 | [
"CWE-362"
] | linux | 6d8c50dcb029872b298eea68cc6209c866fd3e14 | 213,008,724,387,460,900,000,000,000,000,000,000,000 | 5 | socket: close race condition between sock_close() and sockfs_setattr()
fchownat() doesn't even hold refcnt of fd until it figures out
fd is really needed (otherwise is ignored) and releases it after
it resolves the path. This means sock_close() could race with
sockfs_setattr(), which leads to a NULL pointer dereferenc... |
static u32 ndisc_hash(const void *pkey,
const struct net_device *dev,
__u32 *hash_rnd)
{
return ndisc_hashfn(pkey, dev, hash_rnd);
} | 0 | [
"CWE-17"
] | linux | 6fd99094de2b83d1d4c8457f2c83483b2828e75a | 117,293,138,618,591,860,000,000,000,000,000,000,000 | 6 | 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... |
void DcmSCP::dropAndDestroyAssociation()
{
if (m_assoc)
{
notifyAssociationTermination();
ASC_dropSCPAssociation( m_assoc );
ASC_destroyAssociation( &m_assoc );
}
} | 0 | [
"CWE-264"
] | dcmtk | beaf5a5c24101daeeafa48c375120b16197c9e95 | 223,250,204,144,976,370,000,000,000,000,000,000,000 | 9 | 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. |
ALWAYS_INLINE void LoadTwoScalars(const bfloat16** data, Packet* l1,
Packet* l2) {
if (kNumOperands >= 2) {
auto tmp = ConvertTwoBfloat16ToFloat(*data);
*l1 = Eigen::internal::pbroadcast_first<Packet>(tmp);
*l2 = Eigen::internal::pbroadcast_second<Packet>(tmp);
*data ... | 0 | [
"CWE-125"
] | tensorflow | e6cf28c72ba2eb949ca950d834dd6d66bb01cfae | 199,587,636,673,610,300,000,000,000,000,000,000,000 | 12 | Validate that matrix dimension sizes in SparseMatMul are positive.
PiperOrigin-RevId: 401149683
Change-Id: Ib33eafc561a39c8741ece80b2edce6d4aae9a57d |
static void sv_usage(void)
{
BIO_printf(bio_err,"usage: s_server [args ...]\n");
BIO_printf(bio_err,"\n");
BIO_printf(bio_err," -accept arg - port to accept on (default is %d)\n",PORT);
BIO_printf(bio_err," -context arg - set session ID context\n");
BIO_printf(bio_err," -verify arg - turn on peer certificate... | 0 | [] | openssl | 4817504d069b4c5082161b02a22116ad75f822b1 | 333,408,359,177,180,100,000,000,000,000,000,000,000 | 107 | PR: 2658
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de>
Reviewed by: steve
Support for TLS/DTLS heartbeats. |
int do_journal_get_write_access(handle_t *handle,
struct buffer_head *bh)
{
int dirty = buffer_dirty(bh);
int ret;
if (!buffer_mapped(bh) || buffer_freed(bh))
return 0;
/*
* __block_write_begin() could have dirtied some buffers. Clean
* the dirty bit as jbd2_journal_get_write_access() could complain
* ... | 0 | [
"CWE-362"
] | linux | ea3d7209ca01da209cda6f0dea8be9cc4b7a933b | 151,851,548,076,939,670,000,000,000,000,000,000,000 | 24 | ext4: fix races between page faults and hole punching
Currently, page faults and hole punching are completely unsynchronized.
This can result in page fault faulting in a page into a range that we
are punching after truncate_pagecache_range() has been called and thus
we can end up with a page mapped to disk blocks that... |
static void fr_start(struct net_device *dev)
{
hdlc_device *hdlc = dev_to_hdlc(dev);
#ifdef DEBUG_LINK
printk(KERN_DEBUG "fr_start\n");
#endif
if (state(hdlc)->settings.lmi != LMI_NONE) {
state(hdlc)->reliable = 0;
state(hdlc)->dce_changed = 1;
state(hdlc)->request = 0;
state(hdlc)->fullrep_sent = 0;
state... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 274,869,678,641,549,840,000,000,000,000,000,000,000 | 24 | 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... |
theme_adium_append_event_escaped (EmpathyChatView *view,
const gchar *escaped)
{
EmpathyThemeAdium *theme = EMPATHY_THEME_ADIUM (view);
EmpathyThemeAdiumPriv *priv = GET_PRIV (theme);
theme_adium_append_html (theme, "appendMessage",
priv->data->status_html, escaped, NULL, NULL, NULL,
NULL, "... | 0 | [
"CWE-79"
] | empathy | 739aca418457de752be13721218aaebc74bd9d36 | 75,732,191,345,771,910,000,000,000,000,000,000,000 | 17 | theme_adium_append_message: escape alias before displaying it
Not doing so can lead to nasty HTML injection from hostile users.
https://bugzilla.gnome.org/show_bug.cgi?id=662035 |
void *js_realloc(js_State *J, void *ptr, int size)
{
ptr = J->alloc(J->actx, ptr, size);
if (!ptr)
js_outofmemory(J);
return ptr;
} | 0 | [
"CWE-476"
] | mujs | 77ab465f1c394bb77f00966cd950650f3f53cb24 | 50,089,555,015,011,660,000,000,000,000,000,000,000 | 7 | Fix 697401: Error when dropping extra arguments to lightweight functions. |
AsyncWith(asdl_seq * items, asdl_seq * body, int lineno, int col_offset, int
end_lineno, int end_col_offset, PyArena *arena)
{
stmt_ty p;
p = (stmt_ty)PyArena_Malloc(arena, sizeof(*p));
if (!p)
return NULL;
p->kind = AsyncWith_kind;
p->v.AsyncWith.items = items;
p->v.AsyncWith.... | 1 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 304,974,888,497,342,400,000,000,000,000,000,000,000 | 16 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
evbuffer_add_vprintf(struct evbuffer *buf, const char *fmt, va_list ap)
{
char *buffer;
size_t space;
size_t oldoff = buf->off;
int sz;
va_list aq;
/* make sure that at least some space is available */
if (evbuffer_expand(buf, 64) < 0)
return (-1);
for (;;) {
size_t used = buf->misalign + buf->off;
buffe... | 0 | [
"CWE-189"
] | libevent | 7b21c4eabf1f3946d3f63cce1319c490caab8ecf | 296,183,789,869,816,450,000,000,000,000,000,000,000 | 40 | Fix CVE-2014-6272 in Libevent 1.4
For this fix, we need to make sure that passing too-large inputs to
the evbuffer functions can't make us do bad things with the heap. |
SMB2_lease_break(const unsigned int xid, struct cifs_tcon *tcon,
__u8 *lease_key, const __le32 lease_state)
{
struct smb_rqst rqst;
int rc;
struct smb2_lease_ack *req = NULL;
struct cifs_ses *ses = tcon->ses;
int flags = CIFS_OBREAK_OP;
unsigned int total_len;
struct kvec iov[1];
struct kvec rsp_iov;
int re... | 0 | [
"CWE-416",
"CWE-200"
] | linux | 6a3eb3360667170988f8a6477f6686242061488a | 108,829,218,098,104,310,000,000,000,000,000,000,000 | 56 | cifs: Fix use-after-free in SMB2_write
There is a KASAN use-after-free:
BUG: KASAN: use-after-free in SMB2_write+0x1342/0x1580
Read of size 8 at addr ffff8880b6a8e450 by task ln/4196
Should not release the 'req' because it will use in the trace.
Fixes: eccb4422cf97 ("smb3: Add ftrace tracepoints for improved SMB3 de... |
static void set_page_hwpoison_huge_page(struct page *hpage)
{
int i;
int nr_pages = 1 << compound_order(hpage);
for (i = 0; i < nr_pages; i++)
SetPageHWPoison(hpage + i);
} | 0 | [] | linux | c3901e722b2975666f42748340df798114742d6d | 103,392,646,326,326,060,000,000,000,000,000,000,000 | 7 | mm: hwpoison: fix thp split handling in memory_failure()
When memory_failure() runs on a thp tail page after pmd is split, we
trigger the following VM_BUG_ON_PAGE():
page:ffffd7cd819b0040 count:0 mapcount:0 mapping: (null) index:0x1
flags: 0x1fffc000400000(hwpoison)
page dumped because: VM_BUG_ON_PAG... |
void gf_av1_reset_state(AV1State *state, Bool is_destroy)
{
GF_List *l1, *l2;
if (state->frame_state.header_obus) {
while (gf_list_count(state->frame_state.header_obus)) {
GF_AV1_OBUArrayEntry *a = (GF_AV1_OBUArrayEntry*)gf_list_pop_back(state->frame_state.header_obus);
if (a->obu) gf_free(a->obu);
gf_fre... | 0 | [
"CWE-190"
] | gpac | 0cd19f4db70615d707e0e6202933c2ea0c1d36df | 182,254,139,886,516,300,000,000,000,000,000,000,000 | 52 | fixed #2067 |
box_lt(PG_FUNCTION_ARGS)
{
BOX *box1 = PG_GETARG_BOX_P(0);
BOX *box2 = PG_GETARG_BOX_P(1);
PG_RETURN_BOOL(FPlt(box_ar(box1), box_ar(box2)));
} | 0 | [
"CWE-703",
"CWE-189"
] | postgres | 31400a673325147e1205326008e32135a78b4d8a | 1,444,246,173,045,624,700,000,000,000,000,000,000 | 7 | Predict integer overflow to avoid buffer overruns.
Several functions, mostly type input functions, calculated an allocation
size such that the calculation wrapped to a small positive value when
arguments implied a sufficiently-large requirement. Writes past the end
of the inadvertent small allocation followed shortly... |
xmlSchemaParseRestriction(xmlSchemaParserCtxtPtr ctxt, xmlSchemaPtr schema,
xmlNodePtr node, xmlSchemaTypeType parentType)
{
xmlSchemaTypePtr type;
xmlNodePtr child = NULL;
xmlAttrPtr attr;
if ((ctxt == NULL) || (schema == NULL) || (node == NULL))
return (NULL);
/*... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 290,980,602,678,793,340,000,000,000,000,000,000,000 | 290 | 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. |
fetch_from_buf_http(buf_t *buf,
char **headers_out, size_t max_headerlen,
char **body_out, size_t *body_used, size_t max_bodylen,
int force_complete)
{
char *headers, *p;
size_t headerlen, bodylen, contentlen;
int crlf_offset;
check();
if (!buf->hea... | 0 | [] | tor | 19df037e53331ae528b876f225be08f198e0f8b6 | 307,036,911,878,804,100,000,000,000,000,000,000,000 | 83 | Log malformed hostnames in socks5 request respecting SafeLogging |
static int aio_setup_ring(struct kioctx *ctx)
{
struct aio_ring *ring;
struct aio_ring_info *info = &ctx->ring_info;
unsigned nr_events = ctx->max_reqs;
unsigned long size;
int nr_pages;
/* Compensate for the ring buffer's head/tail overlap entry */
nr_events += 2; /* 1 is required, 2 for good luck */
size = ... | 0 | [
"CWE-200"
] | linux | a70b52ec1aaeaf60f4739edb1b422827cb6f3893 | 232,390,436,264,879,370,000,000,000,000,000,000,000 | 68 | vfs: make AIO use the proper rw_verify_area() area helpers
We had for some reason overlooked the AIO interface, and it didn't use
the proper rw_verify_area() helper function that checks (for example)
mandatory locking on the file, and that the size of the access doesn't
cause us to overflow the provided offset limits ... |
int edns_opt_append(struct edns_data* edns, struct regional* region,
uint16_t code, size_t len, uint8_t* data)
{
struct edns_option** prevp;
struct edns_option* opt;
/* allocate new element */
opt = (struct edns_option*)regional_alloc(region, sizeof(*opt));
if(!opt)
return 0;
opt->next = NULL;
opt->opt_code ... | 0 | [
"CWE-787"
] | unbound | 6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640 | 216,607,432,537,779,650,000,000,000,000,000,000,000 | 27 | - Fix Out of Bound Write Compressed Names in rdata_copy(),
reported by X41 D-Sec. |
void usb_enable_ltm(struct usb_device *udev)
{
struct usb_hcd *hcd = bus_to_hcd(udev->bus);
/* Check if the roothub and device supports LTM. */
if (!usb_device_supports_ltm(hcd->self.root_hub) ||
!usb_device_supports_ltm(udev))
return;
/* Set Feature LTM Enable can only be sent if the device is
* configure... | 0 | [
"CWE-703"
] | linux | e50293ef9775c5f1cf3fcc093037dd6a8c5684ea | 238,186,418,356,203,300,000,000,000,000,000,000,000 | 20 | USB: fix invalid memory access in hub_activate()
Commit 8520f38099cc ("USB: change hub initialization sleeps to
delayed_work") changed the hub_activate() routine to make part of it
run in a workqueue. However, the commit failed to take a reference to
the usb_hub structure or to lock the hub interface while doing so. ... |
_AFmoduleinst _af_ima_adpcm_init_decompress (_Track *track, AFvirtualfile *fh,
bool seekok, bool headerless, AFframecount *chunkframes)
{
_AFmoduleinst ret = _AFnewmodinst(&ima_adpcm_decompress);
ima_adpcm_data *d;
AUpvlist pv;
long l;
assert(af_ftell(fh) == track->fpos_first_frame);
d = (ima_adpcm_data *) _a... | 0 | [
"CWE-119"
] | audiofile | e8cf0095b3f319739f9aa1ab5a1aa52b76be8cdd | 249,128,523,649,853,750,000,000,000,000,000,000,000 | 35 | Fix decoding of multi-channel ADPCM audio files. |
bgp_open_option_parse (struct peer *peer, u_char length, int *capability)
{
int ret;
u_char *end;
u_char opt_type;
u_char opt_length;
u_char *pnt;
u_char *error;
u_char error_data[BGP_MAX_PACKET_SIZE];
/* Fetch pointer. */
pnt = stream_pnt (peer->ibuf);
ret = 0;
opt_type = 0;
opt_length = 0;
... | 1 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 57,732,716,677,347,730,000,000,000,000,000,000,000 | 132 | [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 void ohci_td_pkt(const char *msg, const uint8_t *buf, size_t len)
{
} | 0 | [
"CWE-835"
] | qemu | 95ed56939eb2eaa4e2f349fe6dcd13ca4edfd8fb | 1,813,948,778,550,390,000,000,000,000,000,000,000 | 3 | usb: ohci: limit the number of link eds
The guest may builds an infinite loop with link eds. This patch
limit the number of linked ed to avoid this.
Signed-off-by: Li Qiang <liqiang6-s@360.cn>
Message-id: 5899a02e.45ca240a.6c373.93c1@mx.google.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> |
bool cgroup_psi_enabled(void)
{
return false;
} | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 84,528,394,900,359,520,000,000,000,000,000,000,000 | 4 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
mono_class_get_ref_info (MonoClass *klass)
{
if (klass->ref_info_handle == 0)
return NULL;
else
return mono_gchandle_get_target (klass->ref_info_handle);
} | 0 | [
"CWE-20"
] | mono | 65292a69c837b8a5f7a392d34db63de592153358 | 94,627,870,109,531,030,000,000,000,000,000,000,000 | 7 | Handle invalid instantiation of generic methods.
* verify.c: Add new function to internal verifier API to check
method instantiations.
* reflection.c (mono_reflection_bind_generic_method_parameters):
Check the instantiation before returning it.
Fixes #655847 |
static cache_accel_t *read_cache_accel(RBuffer *cache_buf, cache_hdr_t *hdr, cache_map_t *maps, int n_maps) {
if (!cache_buf || !hdr || !hdr->accelerateInfoSize || !hdr->accelerateInfoAddr) {
return NULL;
}
size_t mc = R_MIN (hdr->mappingCount, n_maps);
ut64 offset = va2pa (hdr->accelerateInfoAddr, mc, maps, cach... | 0 | [
"CWE-787"
] | radare2 | c84b7232626badd075caf3ae29661b609164bac6 | 102,724,028,817,730,260,000,000,000,000,000,000,000 | 32 | Fix heap buffer overflow in dyldcache parser ##crash
* Reported by: Lazymio via huntr.dev
* Reproducer: dyldovf |
permit(uid_t uid, gid_t *groups, int ngroups, struct rule **lastr,
uid_t target, const char *cmd, const char **cmdargs)
{
int i;
*lastr = NULL;
for (i = 0; i < nrules; i++) {
if (match(uid, groups, ngroups, target, cmd,
cmdargs, rules[i]))
*lastr = rules[i];
}
if (!*lastr)
return 0;
return (*las... | 0 | [
"CWE-1187",
"CWE-908"
] | doas | 2f83222829448e5bc4c9391d607ec265a1e06531 | 203,261,967,575,725,550,000,000,000,000,000,000,000 | 15 | Added optimization to Makefile (can be set/overruled using OPT).
Added flag to display all warnings during compiling.
Added status checks when parsing user/group IDs for Linux.
Make sure Linux drops original user's groups when running as another user. |
PHP_METHOD(Phar, mount)
{
char *fname, *arch = NULL, *entry = NULL, *path, *actual;
int fname_len, arch_len, entry_len;
size_t path_len, actual_len;
phar_archive_data *pphar;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "pp", &path, &path_len, &actual, &actual_len) == FAILURE) {
return;
}
if (ZEND_SIZE_T_INT_O... | 0 | [
"CWE-281"
] | php-src | e5c95234d87fcb8f6b7569a96a89d1e1544749a6 | 32,793,341,526,711,067,000,000,000,000,000,000,000 | 85 | Fix bug #79082 - Files added to tar with Phar::buildFromIterator have all-access permissions |
xfs_fs_destroy_inode(
struct inode *inode)
{
struct xfs_inode *ip = XFS_I(inode);
trace_xfs_destroy_inode(ip);
ASSERT(!rwsem_is_locked(&inode->i_rwsem));
XFS_STATS_INC(ip->i_mount, vn_rele);
XFS_STATS_INC(ip->i_mount, vn_remove);
xfs_inactive(ip);
ASSERT(XFS_FORCED_SHUTDOWN(ip->i_mount) || ip->i_delayed_bl... | 0 | [
"CWE-416"
] | linux | c9fbd7bbc23dbdd73364be4d045e5d3612cf6e82 | 332,033,899,973,423,750,000,000,000,000,000,000,000 | 31 | xfs: clear sb->s_fs_info on mount failure
We recently had an oops reported on a 4.14 kernel in
xfs_reclaim_inodes_count() where sb->s_fs_info pointed to garbage
and so the m_perag_tree lookup walked into lala land.
Essentially, the machine was under memory pressure when the mount
was being run, xfs_fs_fill_super() fa... |
TEST_P(ProtocolIntegrationTest, 304WithBody) {
initialize();
codec_client_ = makeHttpConnection(lookupPort("http"));
auto response = codec_client_->makeHeaderOnlyRequest(default_request_headers_);
waitForNextUpstreamRequest();
Http::TestResponseHeaderMapImpl response_headers{{":status", "304"}, {"content-l... | 0 | [
"CWE-416"
] | envoy | 148de954ed3585d8b4298b424aa24916d0de6136 | 210,559,541,085,714,880,000,000,000,000,000,000,000 | 42 | CVE-2021-43825
Response filter manager crash
Signed-off-by: Yan Avlasov <yavlasov@google.com> |
static void ExportGreenQuantum(const Image *image,QuantumInfo *quantum_info,
const MagickSizeType number_pixels,const Quantum *magick_restrict p,
unsigned char *magick_restrict q,ExceptionInfo *exception)
{
QuantumAny
range;
ssize_t
x;
assert(exception != (ExceptionInfo *) NULL);
assert(exception-... | 0 | [
"CWE-190"
] | ImageMagick | 5af1dffa4b6ab984b5f13d1e91c95760d75f12a6 | 158,223,128,123,421,040,000,000,000,000,000,000,000 | 104 | outside the range of representable values of type 'unsigned char' (#3083)
Co-authored-by: Zhang Xiaohui <ruc_zhangxiaohui@163.com> |
static unsigned long get_align_mask(void)
{
/* handle 32- and 64-bit case with a single conditional */
if (va_align.flags < 0 || !(va_align.flags & (2 - mmap_is_ia32())))
return 0;
if (!(current->flags & PF_RANDOMIZE))
return 0;
return va_align.mask;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 173,703,235,815,152,300,000,000,000,000,000,000,000 | 11 | mm: larger stack guard gap, between vmas
Stack guard page is a useful feature to reduce a risk of stack smashing
into a different mapping. We have been using a single page gap which
is sufficient to prevent having stack adjacent to a different mapping.
But this seems to be insufficient in the light of the stack usage ... |
static void *xt_tgt_seq_start(struct seq_file *seq, loff_t *pos)
{
struct proc_dir_entry *pde = (struct proc_dir_entry *) seq->private;
u_int16_t af = (unsigned long)pde->data & 0xffff;
u_int16_t type = (unsigned long)pde->data >> 16;
struct list_head *list;
if (af >= NPROTO)
return NULL;
list = type2list(af,... | 0 | [
"CWE-787"
] | linux | 9fa492cdc160cd27ce1046cb36f47d3b2b1efa21 | 195,513,652,933,830,350,000,000,000,000,000,000,000 | 19 | [NETFILTER]: x_tables: simplify compat API
Split the xt_compat_match/xt_compat_target into smaller type-safe functions
performing just one operation. Handle all alignment and size-related
conversions centrally in these function instead of requiring each module to
implement a full-blown conversion function. Replace ->c... |
static long ext4_zero_range(struct file *file, loff_t offset,
loff_t len, int mode)
{
struct inode *inode = file_inode(file);
handle_t *handle = NULL;
unsigned int max_blocks;
loff_t new_size = 0;
int ret = 0;
int flags;
int credits;
int partial_begin, partial_end;
loff_t start, end;
ext4_lblk_t lblk;
... | 0 | [
"CWE-200",
"CWE-908"
] | linux | 592acbf16821288ecdc4192c47e3774a4c48bb64 | 109,763,077,012,215,170,000,000,000,000,000,000,000 | 161 | ext4: zero out the unused memory region in the extent tree block
This commit zeroes out the unused memory region in the buffer_head
corresponding to the extent metablock after writing the extent header
and the corresponding extent node entries.
This is done to prevent random uninitialized data from getting into
the f... |
void FLAC__bitreader_delete(FLAC__BitReader *br)
{
FLAC__ASSERT(0 != br);
FLAC__bitreader_free(br);
free(br);
} | 0 | [
"CWE-125"
] | flac | 2e7931c27eb15e387da440a37f12437e35b22dd4 | 161,184,604,651,082,330,000,000,000,000,000,000,000 | 7 | libFLAC/bitreader.c: Fix out-of-bounds read
Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17069
Testcase: fuzzer_decoder-5670265022840832 |
UBool NumberFormatTest::equalValue(const Formattable& a, const Formattable& b) {
if (a.getType() == b.getType()) {
return a == b;
}
if (a.getType() == Formattable::kLong) {
if (b.getType() == Formattable::kInt64) {
return a.getLong() == b.getLong();
} else if (b.getType(... | 0 | [
"CWE-190"
] | icu | 53d8c8f3d181d87a6aa925b449b51c4a2c922a51 | 313,105,002,207,437,300,000,000,000,000,000,000,000 | 26 | ICU-20246 Fixing another integer overflow in number parsing. |
static void sig_disconnected(IRC_SERVER_REC *server)
{
GSList *tmp;
if (!IS_IRC_SERVER(server))
return;
for (tmp = server->cmdqueue; tmp != NULL; tmp = tmp->next->next) {
g_free(tmp->data);
if (tmp->next->data != NULL)
server_redirect_destroy(tmp->next->data);
}
g_slist_free(server-... | 0 | [
"CWE-416"
] | irssi | b8d3301d34f383f039071214872570385de1bb59 | 323,823,253,216,873,800,000,000,000,000,000,000,000 | 36 | SASL support
The only supported methods are PLAIN and EXTERNAL, the latter is untested as of
now.
The code gets the values from the keys named sasl_{mechanism,username,password}
specified for each chatnet. |
void CopyReshapeWithInput(const NodeDef* reshape, NodeDef* new_reshape,
const string& input, const string& shape) {
new_reshape->set_op("Reshape");
new_reshape->set_device(reshape->device());
SetDataTypeToAttr(GetDataTypeFromAttr(*reshape, "T"), "T", new_reshape);
SetDataTy... | 0 | [
"CWE-476"
] | tensorflow | e6340f0665d53716ef3197ada88936c2a5f7a2d3 | 69,865,111,502,129,315,000,000,000,000,000,000,000 | 15 | Handle a special grappler case resulting in crash.
It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault.
PiperOrigin-RevId: 369242852
Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13... |
static void hashtable_do_clear(hashtable_t *hashtable)
{
list_t *list, *next;
pair_t *pair;
for(list = hashtable->list.next; list != &hashtable->list; list = next)
{
next = list->next;
pair = list_to_pair(list);
json_decref(pair->value);
jsonp_free(pair);
}
} | 0 | [
"CWE-310"
] | jansson | 8f80c2d83808150724d31793e6ade92749b1faa4 | 159,546,467,185,149,640,000,000,000,000,000,000,000 | 13 | CVE-2013-6401: Change hash function, randomize hashes
Thanks to Florian Weimer and Eric Sesterhenn for reporting, reviewing
and testing. |
int gnutls_error_to_alert(int err, int *level)
{
int ret, _level = -1;
switch (err) { /* send appropriate alert */
case GNUTLS_E_DECRYPTION_FAILED:
/* GNUTLS_A_DECRYPTION_FAILED is not sent, because
* it is not defined in SSL3. Note that we must
* not distinguish Decryption failures from mac
* check fai... | 1 | [
"CWE-310"
] | gnutls | db9a7d810f9ee4c9cc49731f5fd9bdeae68d7eaa | 74,686,579,047,274,310,000,000,000,000,000,000,000 | 115 | handshake: check for TLS_FALLBACK_SCSV
If TLS_FALLBACK_SCSV was sent by the client during the handshake, and
the advertised protocol version is lower than GNUTLS_TLS_VERSION_MAX,
send the "Inappropriate fallback" fatal alert and abort the handshake.
This mechanism was defined in RFC7507. |
static int x509_info_cert_type( char **buf, size_t *size,
unsigned char ns_cert_type )
{
int ret;
size_t n = *size;
char *p = *buf;
const char *sep = "";
CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE_SSL_CLIENT, "SSL Client" );
CERT_TYPE( MBEDTLS_X509_NS_CERT_TYPE... | 0 | [
"CWE-287",
"CWE-284"
] | mbedtls | d15795acd5074e0b44e71f7ede8bdfe1b48591fc | 218,545,613,013,813,840,000,000,000,000,000,000,000 | 22 | Improve behaviour on fatal errors
If we didn't walk the whole chain, then there may be any kind of errors in the
part of the chain we didn't check, so setting all flags looks like the safe
thing to do. |
static int dwc3_gadget_get_irq(struct dwc3 *dwc)
{
struct platform_device *dwc3_pdev = to_platform_device(dwc->dev);
int irq;
irq = platform_get_irq_byname(dwc3_pdev, "peripheral");
if (irq > 0)
goto out;
if (irq == -EPROBE_DEFER)
goto out;
irq = platform_get_irq_byname(dwc3_pdev, "dwc_usb3");
if (irq > 0... | 0 | [
"CWE-703",
"CWE-667",
"CWE-189"
] | linux | c91815b596245fd7da349ecc43c8def670d2269e | 232,647,222,729,941,740,000,000,000,000,000,000,000 | 32 | usb: dwc3: gadget: never call ->complete() from ->ep_queue()
This is a requirement which has always existed but, somehow, wasn't
reflected in the documentation and problems weren't found until now
when Tuba Yavuz found a possible deadlock happening between dwc3 and
f_hid. She described the situation as follows:
spin_... |
inline static int jas_fast32_asr(int_fast32_t x, int n)
{
assert(n >= 0);
// The behavior is undefined when x is negative. */
// We tacitly assume the behavior is equivalent to a signed
// arithmetic right shift.
return x >> n;
} | 0 | [
"CWE-119"
] | jasper | 65536647d380571d1a9a6c91fa03775fb5bbd256 | 266,469,547,262,508,020,000,000,000,000,000,000,000 | 8 | A new experimental memory allocator has been introduced. The allocator
is experimental in the sense that its API is not considered stable and
the allocator may change or disappear entirely in future versions of
the code. This new allocator tracks how much memory is being used by
jas_malloc and friends. A maximum upp... |
void kfree(const void *objp)
{
struct kmem_cache *c;
unsigned long flags;
trace_kfree(_RET_IP_, objp);
if (unlikely(ZERO_OR_NULL_PTR(objp)))
return;
local_irq_save(flags);
kfree_debugcheck(objp);
c = virt_to_cache(objp);
debug_check_no_locks_freed(objp, c->object_size);
debug_check_no_obj_freed(objp, c->o... | 0 | [
"CWE-703"
] | linux | c4e490cf148e85ead0d1b1c2caaba833f1d5b29f | 136,489,115,796,452,120,000,000,000,000,000,000,000 | 18 | mm/slab.c: fix SLAB freelist randomization duplicate entries
This patch fixes a bug in the freelist randomization code. When a high
random number is used, the freelist will contain duplicate entries. It
will result in different allocations sharing the same chunk.
It will result in odd behaviours and crashes. It sh... |
static void lg4ff_set_leds(struct hid_device *hid, u8 leds)
{
struct lg_drv_data *drv_data;
struct lg4ff_device_entry *entry;
unsigned long flags;
s32 *value;
drv_data = hid_get_drvdata(hid);
if (!drv_data) {
hid_err(hid, "Private driver data not found!\n");
return;
}
entry = drv_data->device_props;
if (... | 0 | [
"CWE-787"
] | linux | d9d4b1e46d9543a82c23f6df03f4ad697dab361b | 263,879,907,474,766,800,000,000,000,000,000,000,000 | 31 | HID: Fix assumption that devices have inputs
The syzbot fuzzer found a slab-out-of-bounds write bug in the hid-gaff
driver. The problem is caused by the driver's assumption that the
device must have an input report. While this will be true for all
normal HID input devices, a suitably malicious device can violate the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.