func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
psutil_cpu_count_logical(PyObject *self, PyObject *args) {
/*
int mib[2];
int ncpu;
size_t len;
mib[0] = CTL_HW;
mib[1] = HW_NCPU;
len = sizeof(ncpu);
if (sysctl(mib, 2, &ncpu, &len, NULL, 0) == -1)
Py_RETURN_NONE; // mimic os.cpu_count()
else
return Py_BuildValue("... | 0 | [
"CWE-415"
] | psutil | 7d512c8e4442a896d56505be3e78f1156f443465 | 301,015,361,714,198,900,000,000,000,000,000,000,000 | 22 | Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616)
These files contain loops that convert system data into python objects
and during the process they create objects and dereference their
refcounts after they have been added to the resulting list.
However, in case of errors during the creat... |
bool Item_equal::fix_length_and_dec()
{
Item *item= get_first(NO_PARTICULAR_TAB, NULL);
const Type_handler *handler= item->type_handler();
eval_item= handler->make_cmp_item(current_thd, item->collation.collation);
return eval_item == NULL;
} | 0 | [
"CWE-617"
] | server | 807945f2eb5fa22e6f233cc17b85a2e141efe2c8 | 142,760,530,209,178,520,000,000,000,000,000,000,000 | 7 | MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order...
When doing condition pushdown from HAVING into WHERE,
Item_equal::create_pushable_equalities() calls
item->set_extraction_flag(IMMUTABLE_FL) for constant items.
Then, Item::cleanup_excluding_immutables_processor() checks for this flag
to see ... |
xmlSchemaGetEffectiveValueConstraint(xmlSchemaAttributeUsePtr attruse,
int *fixed,
const xmlChar **value,
xmlSchemaValPtr *val)
{
*fixed = 0;
*value = NULL;
if (val != 0)
*val = NULL;
if (attruse->defValue != NULL) {
*value = attruse->defValue;
if (val != NULL)
*val =... | 0 | [
"CWE-134"
] | libxml2 | 4472c3a5a5b516aaf59b89be602fbce52756c3e9 | 184,397,886,356,352,000,000,000,000,000,000,000,000 | 28 | 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. |
npop(void)
{
int result = 0;
if (TPS(stack_ptr) > 0) {
TPS(stack_ptr)--;
if (TPS(stack)[TPS(stack_ptr)].num_type)
result = TPS(stack)[TPS(stack_ptr)].data.num;
} else {
DEBUG(2, ("npop: stack underflow: %s", _nc_visbuf(TPS(tparam_base))));
_nc_tparm_err++;
}
return result;
} | 0 | [] | ncurses | 790a85dbd4a81d5f5d8dd02a44d84f01512ef443 | 320,007,539,153,563,020,000,000,000,000,000,000,000 | 13 | ncurses 6.2 - patch 20200531
+ correct configure version-check/warnng for g++ to allow for 10.x
+ re-enable "bel" in konsole-base (report by Nia Huang)
+ add linux-s entry (patch by Alexandre Montaron).
+ drop long-obsolete convert_configure.pl
+ add test/test_parm.c, for checking tparm changes.
+ improve parameter-ch... |
gst_h264_parser_parse_content_light_level_info (GstH264NalParser * parser,
GstH264ContentLightLevel * cll, NalReader * nr)
{
GST_DEBUG ("parsing \"Content light level\"");
READ_UINT16 (nr, cll->max_content_light_level, 16);
READ_UINT16 (nr, cll->max_pic_average_light_level, 16);
return GST_H264_PARSER_OK;... | 0 | [
"CWE-787"
] | gst-plugins-bad | 11353b3f6e2f047cc37483d21e6a37ae558896bc | 85,258,957,394,538,400,000,000,000,000,000,000,000 | 14 | codecparsers: h264parser: guard against ref_pic_markings overflow
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1703> |
static void FVMenuShowBitmap(GWindow gw, struct gmenuitem *mi, GEvent *UNUSED(e)) {
FontView *fv = (FontView *) GDrawGetUserData(gw);
BDFFont *bdf = mi->ti.userdata;
FV_ChangeDisplayBitmap(fv,bdf); /* Let's not change any of the others */
} | 0 | [
"CWE-119",
"CWE-787"
] | fontforge | 626f751752875a0ddd74b9e217b6f4828713573c | 38,435,085,397,244,230,000,000,000,000,000,000,000 | 6 | Warn users before discarding their unsaved scripts (#3852)
* Warn users before discarding their unsaved scripts
This closes #3846. |
static int xfrm_send_migrate(const struct xfrm_selector *sel, u8 dir, u8 type,
const struct xfrm_migrate *m, int num_migrate,
const struct xfrm_kmaddress *k)
{
struct net *net = &init_net;
struct sk_buff *skb;
skb = nlmsg_new(xfrm_migrate_msgsize(num_migrate, !!k), GFP_ATOMIC);
if (skb == NULL)
r... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 219,554,447,759,164,650,000,000,000,000,000,000,000 | 17 | 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.
... |
void Item_sum::update_used_tables ()
{
if (!Item_sum::const_item())
{
used_tables_cache= 0;
for (uint i=0 ; i < arg_count ; i++)
{
args[i]->update_used_tables();
used_tables_cache|= args[i]->used_tables();
}
/*
MariaDB: don't run the following {
used_tables_cache&=... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 121,635,136,914,338,870,000,000,000,000,000,000,000 | 26 | 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 void curlfile_set_property(char *name, INTERNAL_FUNCTION_PARAMETERS)
{
char *arg = NULL;
int arg_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &arg, &arg_len) == FAILURE) {
return;
}
zend_update_property_string(curl_CURLFile_class, getThis(), name, strlen(name), arg TSRMLS_CC);
} | 0 | [
"CWE-416"
] | php-src | 0e6fe3a4c96be2d3e88389a5776f878021b4c59f | 185,389,991,299,681,330,000,000,000,000,000,000,000 | 10 | Fix bug #73147: Use After Free in PHP7 unserialize() |
static int fsck_commit(struct commit *commit, const char *data,
unsigned long size, struct fsck_options *options)
{
const char *buffer = data ? data : get_commit_buffer(commit, &size);
int ret = fsck_commit_buffer(commit, buffer, size, options);
if (!data)
unuse_commit_buffer(commit, buffer);
return ret;
} | 0 | [
"CWE-20",
"CWE-88",
"CWE-522"
] | git | a124133e1e6ab5c7a9fef6d0e6bcb084e3455b46 | 238,900,336,966,834,900,000,000,000,000,000,000,000 | 9 | fsck: detect submodule urls starting with dash
Urls with leading dashes can cause mischief on older
versions of Git. We should detect them so that they can be
rejected by receive.fsckObjects, preventing modern versions
of git from being a vector by which attacks can spread.
Signed-off-by: Jeff King <peff@peff.net>
Si... |
static void av1_decode_frame_wrapup(AV1State *state)
{
u32 i;
for (i = 0; i < AV1_NUM_REF_FRAMES; i++) {
if ((state->frame_state.refresh_frame_flags >> i) & 1) {
state->RefOrderHint[i] = state->frame_state.order_hint;
state->SavedGmParams[i] = state->GmParams;
state->RefFrameType[i] = state->frame_state.fr... | 0 | [
"CWE-190"
] | gpac | 0cd19f4db70615d707e0e6202933c2ea0c1d36df | 115,813,360,350,894,720,000,000,000,000,000,000,000 | 23 | fixed #2067 |
parse_lease_state(struct TCP_Server_Info *server, struct smb2_create_rsp *rsp,
unsigned int *epoch)
{
char *data_offset;
struct create_context *cc;
unsigned int next;
unsigned int remaining;
char *name;
data_offset = (char *)rsp + 4 + le32_to_cpu(rsp->CreateContextsOffset);
remaining = le32_to_cpu(rsp->Crea... | 0 | [
"CWE-476"
] | linux | cabfb3680f78981d26c078a26e5c748531257ebb | 128,722,933,983,393,860,000,000,000,000,000,000,000 | 27 | CIFS: Enable encryption during session setup phase
In order to allow encryption on SMB connection we need to exchange
a session key and generate encryption and decryption keys.
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com> |
void FeatureWeightsSparseStorage::UpdateSparseDeltaWeights(
const Eigen::ThreadPoolDevice& device,
const Example::SparseFeatures& sparse_features,
const std::vector<double>& normalized_bounded_dual_delta) {
for (int64 k = 0; k < sparse_features.indices->size(); ++k) {
const double feature_value =
... | 0 | [
"CWE-476"
] | tensorflow | f7cc8755ac6683131fdfa7a8a121f9d7a9dec6fb | 306,891,322,677,340,980,000,000,000,000,000,000,000 | 14 | Add several missing validations in SDCA
PiperOrigin-RevId: 372172877
Change-Id: Id366da962432e18dcbfac847d11e98488bebb70a |
finfo_set_len(field_info *fi, const gint length)
{
gint length_remaining;
DISSECTOR_ASSERT_HINT(length >= 0, fi->hfinfo->abbrev);
length_remaining = tvb_captured_length_remaining(fi->ds_tvb, fi->start);
if (length > length_remaining)
fi->length = length_remaining;
else
fi->length = length;
/*
* You cannot... | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 163,820,309,303,461,590,000,000,000,000,000,000,000 | 19 | 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 struct slcan *slc_alloc(void)
{
int i;
char name[IFNAMSIZ];
struct net_device *dev = NULL;
struct slcan *sl;
int size;
for (i = 0; i < maxdev; i++) {
dev = slcan_devs[i];
if (dev == NULL)
break;
}
/* Sorry, too many, all slots in use */
if (i >= maxdev)
return NULL;
sprintf(name, "sl... | 0 | [
"CWE-200",
"CWE-909",
"CWE-908"
] | linux | b9258a2cece4ec1f020715fe3554bc2e360f6264 | 141,045,438,323,029,900,000,000,000,000,000,000,000 | 38 | slcan: Don't transmit uninitialized stack data in padding
struct can_frame contains some padding which is not explicitly zeroed in
slc_bump. This uninitialized data will then be transmitted if the stack
initialization hardening feature is not enabled (CONFIG_INIT_STACK_ALL).
This commit just zeroes the whole struct i... |
ClassType2DataType(enum matio_classes class_type)
{
switch ( class_type ) {
case MAT_C_DOUBLE:
return MAT_T_DOUBLE;
case MAT_C_SINGLE:
return MAT_T_SINGLE;
#ifdef HAVE_MAT_INT64_T
case MAT_C_INT64:
return MAT_T_INT64;
#endif
#ifdef HAVE_MAT_UINT64_T
... | 0 | [
"CWE-401"
] | matio | a47b7cd3aca70e9a0bddf8146eb4ab0cbd19c2c3 | 264,337,138,874,694,300,000,000,000,000,000,000,000 | 37 | Fix memory leak
As reported by https://github.com/tbeu/matio/issues/131 |
Status OpenTableTensorSliceReader(const string& fname,
TensorSliceReader::Table** result) {
*result = nullptr;
Env* env = Env::Default();
std::unique_ptr<RandomAccessFile> f;
Status s = env->NewRandomAccessFile(fname, &f);
if (s.ok()) {
uint64 file_size;
s = env->GetF... | 0 | [
"CWE-369",
"CWE-345"
] | tensorflow | b619c6f865715ca3b15ef1842b5b95edbaa710ad | 165,320,910,663,745,170,000,000,000,000,000,000,000 | 28 | Use BuildTensorShapeBase when parsing unverified TensorShapes during checkpoint loading.
This avoids crashing when the TensorShape has negative dimensions.
PiperOrigin-RevId: 392769882
Change-Id: Id1f7ae7fcf8142193556af47abfda81b13d3cce4 |
static void touch_pmd(struct vm_area_struct *vma, unsigned long addr,
pmd_t *pmd)
{
pmd_t _pmd;
/*
* We should set the dirty bit only for FOLL_WRITE but for now
* the dirty bit in the pmd is meaningless. And if the dirty
* bit will become meaningful and we'll only set it with
* FOLL_WRITE, an atomic set_b... | 1 | [
"CWE-362"
] | linux | a8f97366452ed491d13cf1e44241bc0b5740b1f0 | 156,527,266,375,332,860,000,000,000,000,000,000,000 | 17 | mm, thp: Do not make page table dirty unconditionally in touch_p[mu]d()
Currently, we unconditionally make page table dirty in touch_pmd().
It may result in false-positive can_follow_write_pmd().
We may avoid the situation, if we would only make the page table entry
dirty if caller asks for write access -- FOLL_WRITE... |
int compare(unsigned int a, unsigned int b)
{
if (a < b)
return -1;
if (b < a)
return 1;
return 0;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 325,863,237,089,673,360,000,000,000,000,000,000,000 | 8 | 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... |
static int nfs4_xdr_dec_create_session(struct rpc_rqst *rqstp,
struct xdr_stream *xdr,
void *res)
{
struct compound_hdr hdr;
int status;
status = decode_compound_hdr(xdr, &hdr);
if (!status)
status = decode_create_session(xdr, res);
return status;
} | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 328,458,812,502,671,230,000,000,000,000,000,000,000 | 12 | nfs: Fix getxattr kernel panic and memory overflow
Move the buffer size check to decode_attr_security_label() before memcpy()
Only call memcpy() if the buffer is large enough
Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS")
Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io>
[Trond: clean u... |
static void save_pid(const pid_t pid, const char *pid_file) {
FILE *fp;
if (pid_file == NULL)
return;
if ((fp = fopen(pid_file, "w")) == NULL) {
fprintf(stderr, "Could not open the pid file %s for writing\n", pid_file);
return;
}
fprintf(fp,"%ld\n", (long)pid);
if (fclo... | 0 | [
"CWE-20"
] | memcached | d9cd01ede97f4145af9781d448c62a3318952719 | 326,470,994,028,857,300,000,000,000,000,000,000,000 | 16 | Use strncmp when checking for large ascii multigets. |
intrusive_ptr<Expression> ExpressionCond::parse(ExpressionContext* const expCtx,
BSONElement expr,
const VariablesParseState& vps) {
if (expr.type() != Object) {
return Base::parse(expCtx, expr, vps);
}
v... | 0 | [] | mongo | 1772b9a0393b55e6a280a35e8f0a1f75c014f301 | 209,732,621,551,481,930,000,000,000,000,000,000,000 | 31 | SERVER-49404 Enforce additional checks in $arrayToObject |
static int xfrm_get_sa(struct sk_buff *skb, struct nlmsghdr *nlh,
struct nlattr **attrs)
{
struct net *net = sock_net(skb->sk);
struct xfrm_usersa_id *p = nlmsg_data(nlh);
struct xfrm_state *x;
struct sk_buff *resp_skb;
int err = -ESRCH;
x = xfrm_user_state_lookup(net, p, attrs, &err);
if (x == NULL)
goto o... | 0 | [
"CWE-200"
] | linux | 1f86840f897717f86d523a13e99a447e6a5d2fa5 | 193,753,821,659,714,200,000,000,000,000,000,000,000 | 23 | xfrm_user: fix info leak in copy_to_user_tmpl()
The memory used for the template copy is a local stack variable. As
struct xfrm_user_tmpl contains multiple holes added by the compiler for
alignment, not initializing the memory will lead to leaking stack bytes
to userland. Add an explicit memset(0) to avoid the info le... |
static void mbochs_device_release(struct device *dev)
{
/* nothing */
} | 0 | [
"CWE-200",
"CWE-401"
] | linux | de5494af4815a4c9328536c72741229b7de88e7f | 66,781,964,172,982,710,000,000,000,000,000,000,000 | 4 | vfio/mbochs: Fix missing error unwind of mbochs_used_mbytes
Convert mbochs to use an atomic scheme for this like mtty was changed
into. The atomic fixes various race conditions with probing. Add the
missing error unwind. Also add the missing kfree of mdev_state->pages.
Fixes: 681c1615f891 ("vfio/mbochs: Convert to us... |
static int ip6gre_tunnel_init_common(struct net_device *dev)
{
struct ip6_tnl *tunnel;
int ret;
int t_hlen;
tunnel = netdev_priv(dev);
tunnel->dev = dev;
tunnel->net = dev_net(dev);
strcpy(tunnel->parms.name, dev->name);
dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
if (!dev->tstats)
ret... | 0 | [
"CWE-125"
] | net | 7892032cfe67f4bde6fc2ee967e45a8fbaf33756 | 32,777,580,998,188,370,000,000,000,000,000,000,000 | 36 | ip6_gre: fix ip6gre_err() invalid reads
Andrey Konovalov reported out of bound accesses in ip6gre_err()
If GRE flags contains GRE_KEY, the following expression
*(((__be32 *)p) + (grehlen / 4) - 1)
accesses data ~40 bytes after the expected point, since
grehlen includes the size of IPv6 headers.
Let's use a "struct ... |
void *skb_push(struct sk_buff *skb, unsigned int len);
static inline void *__skb_push(struct sk_buff *skb, unsigned int len)
{
skb->data -= len;
skb->len += len;
return skb->data; | 0 | [
"CWE-20"
] | linux | 2b16f048729bf35e6c28a40cbfad07239f9dcd90 | 115,456,118,294,361,270,000,000,000,000,000,000,000 | 6 | 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... |
static int asn1_find_indefinite_length(const unsigned char *data, size_t datalen,
size_t *_dp, size_t *_len,
const char **_errmsg)
{
unsigned char tag, tmp;
size_t dp = *_dp, len, n;
int indef_level = 1;
next_tag:
if (unlikely(datalen - dp < 2)) {
if (datalen == dp)
goto missing_eoc;
g... | 0 | [
"CWE-787"
] | linux | 23c8a812dc3c621009e4f0e5342aa4e2ede1ceaa | 212,768,600,872,884,450,000,000,000,000,000,000,000 | 84 | KEYS: Fix ASN.1 indefinite length object parsing
This fixes CVE-2016-0758.
In the ASN.1 decoder, when the length field of an ASN.1 value is extracted,
it isn't validated against the remaining amount of data before being added
to the cursor. With a sufficiently large size indicated, the check:
datalen - dp < 2
may... |
proto_tree_set_guid_tvb(field_info *fi, tvbuff_t *tvb, gint start,
const guint encoding)
{
e_guid_t guid;
tvb_get_guid(tvb, start, &guid, encoding);
proto_tree_set_guid(fi, &guid);
} | 0 | [
"CWE-401"
] | wireshark | a9fc769d7bb4b491efb61c699d57c9f35269d871 | 83,209,494,008,776,400,000,000,000,000,000,000,000 | 8 | 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. |
create_restrict_node(
address_node * addr,
address_node * mask,
int_fifo * flags,
int line_no
)
{
restrict_node *my_node;
my_node = emalloc_zero(sizeof(*my_node));
my_node->addr = addr;
my_node->mask = mask;
my_node->flags = flags;
my_node->line_no = line_no;
return my_node;
} | 0 | [
"CWE-19"
] | ntp | fe46889f7baa75fc8e6c0fcde87706d396ce1461 | 321,033,627,700,417,220,000,000,000,000,000,000,000 | 17 | [Sec 2942]: Off-path DoS attack on auth broadcast mode. HStenn. |
xmlXPtrHereFunction(xmlXPathParserContextPtr ctxt, int nargs) {
CHECK_ARITY(0);
if (ctxt->context->here == NULL)
XP_ERROR(XPTR_SYNTAX_ERROR);
valuePush(ctxt, xmlXPtrNewLocationSetNodes(ctxt->context->here, NULL));
} | 0 | [
"CWE-416"
] | libxml2 | 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e | 192,922,850,004,249,500,000,000,000,000,000,000,000 | 8 | 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 int sev_guest_init(struct kvm *kvm, struct kvm_sev_cmd *argp)
{
struct kvm_sev_info *sev = &to_kvm_svm(kvm)->sev_info;
int asid, ret;
if (kvm->created_vcpus)
return -EINVAL;
ret = -EBUSY;
if (unlikely(sev->active))
return ret;
sev->active = true;
sev->es_active = argp->id == KVM_SEV_ES_INIT;
asid ... | 0 | [
"CWE-459"
] | linux | 683412ccf61294d727ead4a73d97397396e69a6b | 338,074,414,016,517,930,000,000,000,000,000,000,000 | 38 | KVM: SEV: add cache flush to solve SEV cache incoherency issues
Flush the CPU caches when memory is reclaimed from an SEV guest (where
reclaim also includes it being unmapped from KVM's memslots). Due to lack
of coherency for SEV encrypted memory, failure to flush results in silent
data corruption if userspace is mal... |
static void event_end_of_names(IRC_SERVER_REC *server, const char *data)
{
char *params, *channel;
IRC_CHANNEL_REC *chanrec;
NICK_REC *ownnick;
int nicks;
g_return_if_fail(server != NULL);
params = event_get_params(data, 2, NULL, &channel);
chanrec = irc_channel_find(server, channel);
if (chanrec != NULL && ... | 0 | [
"CWE-476"
] | irssi | 6c6c42e3d1b49d90aacc0b67f8540471cae02a1d | 33,260,842,400,222,163,000,000,000,000,000,000,000 | 30 | Merge branch 'security' into 'master'
See merge request !7 |
void irc_servers_deinit(void)
{
if (cmd_tag != -1)
g_source_remove(cmd_tag);
signal_remove("server connected", (SIGNAL_FUNC) sig_connected);
signal_remove("server disconnected", (SIGNAL_FUNC) sig_disconnected);
signal_remove("server quit", (SIGNAL_FUNC) sig_server_quit);
signal_remove("event 001", (SIGNA... | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 285,925,022,555,402,400,000,000,000,000,000,000,000 | 26 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
bool may_open_dev(const struct path *path)
{
return !(path->mnt->mnt_flags & MNT_NODEV) &&
!(path->mnt->mnt_sb->s_iflags & SB_I_NODEV);
} | 0 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 310,357,992,215,442,020,000,000,000,000,000,000,000 | 5 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
_equalReplicaIdentityStmt(const ReplicaIdentityStmt *a, const ReplicaIdentityStmt *b)
{
COMPARE_SCALAR_FIELD(identity_type);
COMPARE_STRING_FIELD(name);
return true;
} | 0 | [
"CWE-362"
] | postgres | 5f173040e324f6c2eebb90d86cf1b0cdb5890f0a | 56,152,404,947,477,615,000,000,000,000,000,000,000 | 7 | Avoid repeated name lookups during table and index DDL.
If the name lookups come to different conclusions due to concurrent
activity, we might perform some parts of the DDL on a different table
than other parts. At least in the case of CREATE INDEX, this can be
used to cause the permissions checks to be performed aga... |
void TABLE_LIST::calc_md5(char *buffer)
{
uchar digest[16];
compute_md5_hash(digest, select_stmt.str,
select_stmt.length);
sprintf(buffer,
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
digest[0], digest[1], digest[2], digest[3],
digest[4], digest[5], digest... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 335,937,987,392,432,830,000,000,000,000,000,000,000 | 12 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
rsvg_clip_path_parse (const RsvgDefs * defs, const char *str)
{
char *name;
name = rsvg_get_url_string (str);
if (name) {
RsvgNode *val;
val = rsvg_defs_lookup (defs, name);
g_free (name);
if (val && (!strcmp (val->type->str, "clipPath")))
return val;
}
... | 1 | [] | librsvg | 34c95743ca692ea0e44778e41a7c0a129363de84 | 281,763,794,453,980,160,000,000,000,000,000,000,000 | 15 | Store node type separately in RsvgNode
The node name (formerly RsvgNode:type) cannot be used to infer
the sub-type of RsvgNode that we're dealing with, since for unknown
elements we put type = node-name. This lead to a (potentially exploitable)
crash e.g. when the element name started with "fe" which tricked
the old c... |
double Field_medium::val_real(void)
{
ASSERT_COLUMN_MARKED_FOR_READ;
long j= unsigned_flag ? (long) uint3korr(ptr) : sint3korr(ptr);
return (double) j;
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 76,518,663,115,582,920,000,000,000,000,000,000,000 | 6 | 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... |
phar_entry_info *phar_get_link_source(phar_entry_info *entry) /* {{{ */
{
phar_entry_info *link_entry;
char *link;
if (!entry->link) {
return entry;
}
link = phar_get_link_location(entry);
if (NULL != (link_entry = zend_hash_str_find_ptr(&(entry->phar->manifest), entry->link, strlen(entry->link))) ||
NULL !... | 0 | [
"CWE-119",
"CWE-787"
] | php-src | 0bfb970f43acd1e81d11be1154805f86655f15d5 | 55,588,122,225,229,640,000,000,000,000,000,000,000 | 23 | Fix bug #72928 - Out of bound when verify signature of zip phar in phar_parse_zipfile
(cherry picked from commit 19484ab77466f99c78fc0e677f7e03da0584d6a2) |
MaybeLocal<Value> GetCert(Environment* env, const SSLPointer& ssl) {
ClearErrorOnReturn clear_error_on_return;
X509* cert = SSL_get_certificate(ssl.get());
if (cert == nullptr)
return Undefined(env->isolate());
MaybeLocal<Object> maybe_cert = X509ToObject(env, cert);
return maybe_cert.FromMaybe<Value>(Lo... | 0 | [
"CWE-295"
] | node | 466e5415a2b7b3574ab5403acb87e89a94a980d1 | 222,373,918,789,664,800,000,000,000,000,000,000,000 | 9 | crypto,tls: implement safe x509 GeneralName format
This change introduces JSON-compatible escaping rules for strings that
include X.509 GeneralName components (see RFC 5280). This non-standard
format avoids ambiguities and prevents injection attacks that could
previously lead to X.509 certificates being accepted even ... |
smb3_downgrade_oplock(struct TCP_Server_Info *server,
struct cifsInodeInfo *cinode, __u32 oplock,
unsigned int epoch, bool *purge_cache)
{
unsigned int old_state = cinode->oplock;
unsigned int old_epoch = cinode->epoch;
unsigned int new_state;
if (epoch > old_epoch) {
smb21_set_oplock_level(cin... | 0 | [
"CWE-476"
] | linux | d6f5e358452479fa8a773b5c6ccc9e4ec5a20880 | 6,639,213,445,723,476,000,000,000,000,000,000,000 | 22 | 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... |
void rds_ib_dev_put(struct rds_ib_device *rds_ibdev)
{
BUG_ON(atomic_read(&rds_ibdev->refcount) <= 0);
if (atomic_dec_and_test(&rds_ibdev->refcount))
queue_work(rds_wq, &rds_ibdev->free_work);
} | 0 | [
"CWE-399",
"CWE-476"
] | linux | c2349758acf1874e4c2b93fe41d072336f1a31d0 | 127,973,461,461,440,830,000,000,000,000,000,000,000 | 6 | rds: prevent dereference of a NULL device
Binding might result in a NULL device, which is dereferenced
causing this BUG:
[ 1317.260548] BUG: unable to handle kernel NULL pointer dereference at 000000000000097
4
[ 1317.261847] IP: [<ffffffff84225f52>] rds_ib_laddr_check+0x82/0x110
[ 1317.263315] PGD 418bcb067 PUD 3ceb... |
int special(DviContext *dvi, int opcode)
{
char *s;
Int32 arg;
arg = dugetn(dvi, opcode - DVI_XXX1 + 1);
s = mdvi_malloc(arg + 1);
dread(dvi, s, arg);
s[arg] = 0;
mdvi_do_special(dvi, s);
SHOWCMD((dvi, "XXXX", opcode - DVI_XXX1 + 1,
"[%s]", s));
mdvi_free(s);
return 0;
} | 1 | [
"CWE-20"
] | evince | d4139205b010ed06310d14284e63114e88ec6de2 | 144,021,900,882,273,980,000,000,000,000,000,000,000 | 15 | backends: Fix several security issues in the dvi-backend.
See CVE-2010-2640, CVE-2010-2641, CVE-2010-2642 and CVE-2010-2643. |
int SELECT_LEX::vers_setup_conds(THD *thd, TABLE_LIST *tables)
{
DBUG_ENTER("SELECT_LEX::vers_setup_conds");
const bool update_conds= !skip_setup_conds(thd);
if (!versioned_tables)
{
for (TABLE_LIST *table= tables; table; table= table->next_local)
{
if (table->table && table->table->versioned())
... | 0 | [] | server | 8c34eab9688b4face54f15f89f5d62bdfd93b8a7 | 99,494,247,930,205,000,000,000,000,000,000,000,000 | 162 | MDEV-28094 Window function in expression in ORDER BY
call item->split_sum_func() in setup_order() just as
it's done in setup_fields() |
char *imap_fix_path (IMAP_DATA *idata, const char *mailbox, char *path,
size_t plen)
{
int i = 0;
char delim = '\0';
if (idata)
delim = idata->delim;
while (mailbox && *mailbox && i < plen - 1)
{
if ((ImapDelimChars && strchr(ImapDelimChars, *mailbox))
|| (delim && *mail... | 0 | [
"CWE-125"
] | mutt | 7c4779ac24d2fb68a2a47b58c7904118f40965d5 | 107,330,404,882,379,360,000,000,000,000,000,000,000 | 37 | Fix seqset iterator when it ends in a comma.
If the seqset ended with a comma, the substr_end marker would be just
before the trailing nul. In the next call, the loop to skip the
marker would iterate right past the end of string too.
The fix is simple: place the substr_end marker and skip past it
immediately. |
dnsc_nonce_cache_insert(struct slabhash *cache,
const uint8_t nonce[crypto_box_HALF_NONCEBYTES],
const uint8_t magic_query[DNSCRYPT_MAGIC_HEADER_LEN],
const uint8_t pk[crypto_box_PUBLICKEYBYTES],
uint32_t hash)
{
struct ... | 0 | [
"CWE-190"
] | unbound | 02080f6b180232f43b77f403d0c038e9360a460f | 288,266,591,129,950,760,000,000,000,000,000,000,000 | 24 | - Fix Integer Overflows in Size Calculations,
reported by X41 D-Sec. |
static void vvalue_strbuf_append_i8(wmem_strbuf_t *strbuf, void *ptr)
{
gint64 i8 = *(gint64*)ptr;
wmem_strbuf_append_printf(strbuf, "%" G_GINT64_MODIFIER "d", i8);
} | 0 | [
"CWE-770"
] | wireshark | b7a0650e061b5418ab4a8f72c6e4b00317aff623 | 233,201,863,969,469,300,000,000,000,000,000,000,000 | 5 | MS-WSP: Don't allocate huge amounts of memory.
Add a couple of memory allocation sanity checks, one of which
fixes #17331. |
static int atalk_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
{
struct sockaddr_at *addr = (struct sockaddr_at *)uaddr;
struct sock *sk = sock->sk;
struct atalk_sock *at = at_sk(sk);
if (!sk->sk_zapped || addr_len != sizeof(struct sockaddr_at))
return -EINVAL;
if (addr->sat_family != AF_APPL... | 0 | [] | history | 7ab442d7e0a76402c12553ee256f756097cae2d2 | 280,805,212,141,536,520,000,000,000,000,000,000,000 | 44 | [DDP]: Convert to new protocol interface.
Convert ddp to the new protocol interface which means it has to
handle fragmented skb's. The only big change is in the checksum
routine which has to do more work (like skb_checksum).
Minor speedup is folding the carry to avoid a branch.
Tested against a 2.4 system and by ru... |
*/
static long io_uring_setup(u32 entries, struct io_uring_params __user *params)
{
struct io_uring_params p;
int i;
if (copy_from_user(&p, params, sizeof(p)))
return -EFAULT;
for (i = 0; i < ARRAY_SIZE(p.resv); i++) {
if (p.resv[i])
return -EINVAL;
}
if (p.flags & ~(IORING_SETUP_IOPOLL | IORING_SETUP_S... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 6,022,316,657,308,586,000,000,000,000,000,000,000 | 20 | io_uring: ensure that SQPOLL thread is started for exit
If we create it in a disabled state because IORING_SETUP_R_DISABLED is
set on ring creation, we need to ensure that we've kicked the thread if
we're exiting before it's been explicitly disabled. Otherwise we can run
into a deadlock where exit is waiting go park t... |
mbc_case_fold(OnigCaseFoldType flag ARG_UNUSED,
const UChar** pp, const UChar* end ARG_UNUSED, UChar* lower)
{
const UChar* p = *pp;
*lower = ENC_ISO_8859_5_TO_LOWER_CASE(*p);
(*pp)++;
return 1;
} | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 19,059,772,306,213,130,000,000,000,000,000,000,000 | 9 | onig-5.9.2 |
u32 gf_utf8_wcstombs(char* dest, size_t len, const unsigned short** srcp)
{
/*
* Original code from the GNU UTF-8 Library
*/
size_t count;
const unsigned short * src = *srcp;
if (dest != NULL) {
char* destptr = dest;
for (;; src++) {
unsigned char c;
unsigned short wc = *src;
if (wc < 0x80) {
if... | 0 | [
"CWE-276"
] | gpac | 96699aabae042f8f55cf8a85fa5758e3db752bae | 241,573,050,491,543,500,000,000,000,000,000,000,000 | 66 | fixed #2061 |
parser_parse_import_statement (parser_context_t *context_p) /**< parser context */
{
JERRY_ASSERT (context_p->token.type == LEXER_KEYW_IMPORT);
JERRY_ASSERT (context_p->module_names_p == NULL);
if (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_PAREN, LIT_CHAR_DOT))
{
if (context_p->status_flags & P... | 0 | [
"CWE-787"
] | jerryscript | efe63a5bbc5106164a08ee2eb415a7a701f5311f | 267,431,734,794,706,260,000,000,000,000,000,000,000 | 115 | Fix parsing unterminated let statement (#4808)
This patch fixes #4754
JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik robert.fancsik@h-lab.eu |
static int tcp_v6_connect(struct sock *sk, struct sockaddr *uaddr,
int addr_len)
{
struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;
struct inet_sock *inet = inet_sk(sk);
struct inet_connection_sock *icsk = inet_csk(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct tcp_sock *tp = tcp_sk(sk);
struct ... | 0 | [
"CWE-284"
] | linux | ac6e780070e30e4c35bd395acfe9191e6268bdd3 | 140,005,777,928,596,460,000,000,000,000,000,000,000 | 189 | tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()
Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.
We ... |
int CLASS parse_jpeg (int offset)
{
int len, save, hlen, mark;
fseek (ifp, offset, SEEK_SET);
if (fgetc(ifp) != 0xff || fgetc(ifp) != 0xd8) return 0;
while (fgetc(ifp) == 0xff && (mark = fgetc(ifp)) != 0xda) {
order = 0x4d4d;
len = get2() - 2;
save = ftell(ifp);
if (mark == 0xc0 || mark == ... | 0 | [
"CWE-703"
] | LibRaw | 11909cc59e712e09b508dda729b99aeaac2b29ad | 146,248,794,820,475,100,000,000,000,000,000,000,000 | 25 | cumulated data checks patch |
HttpHeader::parse(const char *header_start, size_t hdrLen)
{
const char *field_ptr = header_start;
const char *header_end = header_start + hdrLen; // XXX: remove
int warnOnError = (Config.onoff.relaxed_header_parser <= 0 ? DBG_IMPORTANT : 2);
PROF_start(HttpHeaderParse);
assert(header_start && hea... | 1 | [
"CWE-444"
] | squid | fd68382860633aca92065e6c343cfd1b12b126e7 | 150,235,400,563,018,470,000,000,000,000,000,000,000 | 172 | Improve Transfer-Encoding handling (#702)
Reject messages containing Transfer-Encoding header with coding other
than chunked or identity. Squid does not support other codings.
For simplicity and security sake, also reject messages where
Transfer-Encoding contains unnecessary complex values that are
technically equiva... |
BackwardTab()
{
register int x = curr->w_x;
if (curr->w_tabs[x] && x > 0)
x--;
while (x > 0 && !curr->w_tabs[x])
x--;
curr->w_x = x;
LGotoPos(&curr->w_layer, curr->w_x, curr->w_y);
} | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 48,751,412,510,953,080,000,000,000,000,000,000,000 | 11 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
find_same_op(const gs_composite_t *composite_action, int my_op, gs_composite_t **ppcte)
{
const gs_pdf14trans_t *pct0 = (gs_pdf14trans_t *)composite_action;
gs_composite_t *pct = *ppcte;
for (;;) {
if (pct->type->comp_id == GX_COMPOSITOR_PDF14_TRANS) {
gs_pdf14trans_t *pct_pdf14 = (gs_p... | 0 | [
"CWE-416"
] | ghostpdl | 90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb | 283,764,311,375,616,530,000,000,000,000,000,000,000 | 29 | Bug 697456. Dont create new ctx when pdf14 device reenabled
This bug had yet another weird case where the user created a
file that pushed the pdf14 device twice. We were in that case,
creating a new ctx and blowing away the original one with out
proper clean up. To avoid, only create a new one when we need it. |
static int ZEND_FASTCALL ZEND_SL_SPEC_CV_VAR_HANDLER(ZEND_OPCODE_HANDLER_ARGS)
{
zend_op *opline = EX(opline);
zend_free_op free_op2;
shift_left_function(&EX_T(opline->result.u.var).tmp_var,
_get_zval_ptr_cv(&opline->op1, EX(Ts), BP_VAR_R TSRMLS_CC),
_get_zval_ptr_var(&opline->op2, EX(Ts), &free_op2 TSRMLS_CC)... | 0 | [] | php-src | ce96fd6b0761d98353761bf78d5bfb55291179fd | 333,691,007,695,131,600,000,000,000,000,000,000,000 | 12 | - fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus |
map_slot_to_real (Proxy *px,
CK_SLOT_ID_PTR slot,
Mapping *mapping)
{
CK_RV rv;
assert (mapping != NULL);
p11_lock ();
if (!PROXY_VALID (px))
rv = CKR_CRYPTOKI_NOT_INITIALIZED;
else
rv = map_slot_unlocked (px, *slot, mapping);
if (rv == CKR_OK)
*slot = mapping->r... | 0 | [
"CWE-190"
] | p11-kit | 5307a1d21a50cacd06f471a873a018d23ba4b963 | 45,122,482,991,190,430,000,000,000,000,000,000,000 | 21 | Check for arithmetic overflows before allocating |
int getDataSize() const { return h * line; } | 0 | [
"CWE-476",
"CWE-190"
] | poppler | 27354e9d9696ee2bc063910a6c9a6b27c5184a52 | 143,381,448,171,594,600,000,000,000,000,000,000,000 | 1 | JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up |
int snd_rawmidi_drop_output(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
struct snd_rawmidi_runtime *runtime = substream->runtime;
snd_rawmidi_output_trigger(substream, 0);
runtime->drain = 0;
spin_lock_irqsave(&runtime->lock, flags);
runtime->appl_ptr = runtime->hw_ptr = 0;
runtime->avail = ... | 0 | [
"CWE-415"
] | linux | 39675f7a7c7e7702f7d5341f1e0d01db746543a0 | 322,609,817,318,074,500,000,000,000,000,000,000,000 | 13 | ALSA: rawmidi: Change resized buffers atomically
The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the
current code is racy. For example, the sequencer client may write to
buffer while it being resized.
As a simple workaround, let's switch to the resized buffer inside the
stream runtime lock.
Reported... |
UTFstring::UTFstring(std::wstring const &_aBuf)
:_Length(0)
,_Data(NULL)
{
*this = _aBuf.c_str();
} | 0 | [
"CWE-200",
"CWE-703"
] | libebml | ababb64e0c792ad2a314245233db0833ba12036b | 135,312,651,551,650,700,000,000,000,000,000,000,000 | 6 | EbmlUnicodeString: don't read beyond end of string
The conversion from an UTF-8 encoded string into a wchar_t one was
reading from beyond the end of the source buffer if the length indicated
by a UTF-8 character's first byte exceeds the number of bytes actually
present afterwards.
Fixes the issue reported as Cisco TA... |
static int cxusb_mygica_d689_frontend_attach(struct dvb_usb_adapter *adap)
{
struct dvb_usb_device *d = adap->dev;
/* Select required USB configuration */
if (usb_set_interface(d->udev, 0, 0) < 0)
err("set interface failed");
/* Unblock all USB pipes */
usb_clear_halt(d->udev,
usb_sndbulkpipe(d->udev, d->pro... | 0 | [
"CWE-119",
"CWE-787"
] | linux | 3f190e3aec212fc8c61e202c51400afa7384d4bc | 98,759,356,383,236,850,000,000,000,000,000,000,000 | 37 | [media] cxusb: Use a dma capable buffer also for reading
Commit 17ce039b4e54 ("[media] cxusb: don't do DMA on stack")
added a kmalloc'ed bounce buffer for writes, but missed to do the same
for reads. As the read only happens after the write is finished, we can
reuse the same buffer.
As dvb_usb_generic_rw handles a re... |
ordinal_to_jd(VALUE y, int d, double sg,
VALUE *nth, int *ry,
int *rjd,
int *ns)
{
double style = guess_style(y, sg);
if (style == 0) {
int jd;
c_ordinal_to_jd(FIX2INT(y), d, sg, &jd, ns);
decode_jd(INT2FIX(jd), nth, rjd);
if (f_zero_p(*nth))
*ry = FIX2INT(y);
else {
VALUE ... | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 241,619,458,268,528,400,000,000,000,000,000,000,000 | 24 | Add length limit option for methods that parses date strings
`Date.parse` now raises an ArgumentError when a given date string is
longer than 128. You can configure the limit by giving `limit` keyword
arguments like `Date.parse(str, limit: 1000)`. If you pass `limit: nil`,
the limit is disabled.
Not only `Date.parse`... |
static INLINE BOOL update_read_delta_rects(wStream* s, DELTA_RECT* rectangles, UINT32 number)
{
UINT32 i;
BYTE flags = 0;
BYTE* zeroBits;
UINT32 zeroBitsSize;
if (number > 45)
number = 45;
zeroBitsSize = ((number + 1) / 2);
if (Stream_GetRemainingLength(s) < zeroBitsSize)
return FALSE;
Stream_GetPointer... | 1 | [
"CWE-125"
] | FreeRDP | 907640a924fa7a9a99c80a48ac225e9d8e41548b | 63,647,108,490,106,160,000,000,000,000,000,000,000 | 61 | Fixed CVE-2020-11522: Limit number of DELTA_RECT to 45.
Thanks to Sunglin and HuanGMz from Knownsec 404 |
int64_t get_image_size(const char *filename)
{
int fd;
int64_t size;
fd = open(filename, O_RDONLY | O_BINARY);
if (fd < 0)
return -1;
size = lseek(fd, 0, SEEK_END);
close(fd);
return size;
} | 0 | [
"CWE-787"
] | qemu | e423455c4f23a1a828901c78fe6d03b7dde79319 | 141,103,710,837,554,330,000,000,000,000,000,000,000 | 11 | hw/core/loader: Fix possible crash in rom_copy()
Both, "rom->addr" and "addr" are derived from the binary image
that can be loaded with the "-kernel" paramer. The code in
rom_copy() then calculates:
d = dest + (rom->addr - addr);
and uses "d" as destination in a memcpy() some lines later. Now with
bad kernel ima... |
CHAT_DCC_REC *dcc_chat_find_id(const char *id)
{
GSList *tmp;
g_return_val_if_fail(id != NULL, NULL);
for (tmp = dcc_conns; tmp != NULL; tmp = tmp->next) {
CHAT_DCC_REC *dcc = tmp->data;
if (IS_DCC_CHAT(dcc) && dcc->id != NULL &&
g_ascii_strcasecmp(dcc->id, id) == 0)
return dcc;
}
return NULL;
} | 0 | [
"CWE-416"
] | irssi | 43e44d553d44e313003cee87e6ea5e24d68b84a1 | 200,918,295,666,853,820,000,000,000,000,000,000,000 | 16 | Merge branch 'security' into 'master'
Security
Closes GL#12, GL#13, GL#14, GL#15, GL#16
See merge request irssi/irssi!23 |
NO_INLINE JsVar *__jspeBinaryExpression(JsVar *a, unsigned int lastPrecedence) {
/* This one's a bit strange. Basically all the ops have their own precedence, it's not
* like & and | share the same precedence. We don't want to recurse for each one,
* so instead we do this.
*
* We deal with an expression i... | 0 | [
"CWE-787"
] | Espruino | e069be2ecc5060ef47391716e4de94999595b260 | 103,412,852,209,752,100,000,000,000,000,000,000,000 | 107 | Fix potential corruption issue caused by `delete [].__proto__` (fix #2142) |
epass2003_check_sw(struct sc_card *card, unsigned int sw1, unsigned int sw2)
{
const int err_count = sizeof(epass2003_errors)/sizeof(epass2003_errors[0]);
int i;
/* Handle special cases here */
if (sw1 == 0x6C) {
sc_log(card->ctx, "Wrong length; correct length is %d", sw2);
return SC_ERROR_WRONG_LENGTH;
}
... | 0 | [
"CWE-415",
"CWE-119"
] | OpenSC | 360e95d45ac4123255a4c796db96337f332160ad | 18,972,389,960,523,943,000,000,000,000,000,000,000 | 22 | fixed out of bounds writes
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting the problems. |
static bool shall_skip_gtids(Log_event* ev)
{
bool filtered= false;
switch (ev->get_type_code())
{
case GTID_LOG_EVENT:
case ANONYMOUS_GTID_LOG_EVENT:
{
Gtid_log_event *gtid= (Gtid_log_event *) ev;
if (opt_include_gtids_str != NULL)
{
filtered= filtered ||
!gt... | 0 | [
"CWE-284",
"CWE-295"
] | mysql-server | 3bd5589e1a5a93f9c224badf983cd65c45215390 | 265,701,380,490,714,600,000,000,000,000,000,000,000 | 88 | WL#6791 : Redefine client --ssl option to imply enforced encryption
# Changed the meaning of the --ssl=1 option of all client binaries
to mean force ssl, not try ssl and fail over to eunecrypted
# Added a new MYSQL_OPT_SSL_ENFORCE mysql_options()
option to specify that an ssl connection is required.
# Added a new macr... |
static int count_inuse(struct page *page)
{
return page->inuse;
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 9,675,651,284,398,635,000,000,000,000,000,000,000 | 4 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
get_child_pid_relative_to_parent_sandbox (int pid,
GError **error)
{
g_autofree char *status_file_path = NULL;
g_autoptr(GFile) status_file = NULL;
g_autoptr(GFileInputStream) input_stream = NULL;
g_autoptr(GDataInputStream) data_stream = NULL;
int relative_pid =... | 0 | [
"CWE-94",
"CWE-74"
] | flatpak | aeb6a7ab0abaac4a8f4ad98b3df476d9de6b8bd4 | 239,910,748,629,035,200,000,000,000,000,000,000,000 | 60 | portal: Convert --env in extra-args into --env-fd
This hides overridden variables from the command-line, which means
processes running under other uids can't see them in /proc/*/cmdline,
which might be important if they contain secrets.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Part-of: https://github.com/fl... |
static authz_status oidc_handle_unauthorized_user24(request_rec *r) {
oidc_debug(r, "enter");
oidc_cfg *c = ap_get_module_config(r->server->module_config, &auth_openidc_module);
if (apr_strnatcasecmp((const char*) ap_auth_type(r),
OIDC_AUTH_TYPE_OPENID_OAUTH20) == 0) {
oidc_debug(r, "setting environment... | 0 | [
"CWE-601"
] | mod_auth_openidc | 03e6bfb446f4e3f27c003d30d6a433e5dd8e2b3d | 52,232,486,407,232,180,000,000,000,000,000,000,000 | 54 | apply OIDCRedirectURLsAllowed setting to target_link_uri
closes #672; thanks @Meheni
release 2.4.9.4
Signed-off-by: Hans Zandbelt <hans.zandbelt@zmartzone.eu> |
struct sctp_chunk *sctp_make_cwr(const struct sctp_association *asoc,
const __u32 lowest_tsn,
const struct sctp_chunk *chunk)
{
struct sctp_chunk *retval;
struct sctp_cwrhdr cwr;
cwr.lowest_tsn = htonl(lowest_tsn);
retval = sctp_make_control(asoc, SCTP_CID_ECN_CWR, 0,
sizeof(cwr), GFP_ATOMIC);
i... | 0 | [
"CWE-20"
] | linux | 07f2c7ab6f8d0a7e7c5764c4e6cc9c52951b9d9c | 115,728,197,896,205,360,000,000,000,000,000,000,000 | 33 | sctp: verify size of a new chunk in _sctp_make_chunk()
When SCTP makes INIT or INIT_ACK packet the total chunk length
can exceed SCTP_MAX_CHUNK_LEN which leads to kernel panic when
transmitting these packets, e.g. the crash on sending INIT_ACK:
[ 597.804948] skbuff: skb_over_panic: text:00000000ffae06e4 len:120168
... |
static unsigned shmem_find_get_pages_and_swap(struct address_space *mapping,
pgoff_t start, unsigned int nr_pages,
struct page **pages, pgoff_t *indices)
{
void **slot;
unsigned int ret = 0;
struct radix_tree_iter iter;
if (!nr_pages)
return 0;
rcu_read_lock();
restart:
radix_tree_for_each_slot(slot... | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 309,925,072,892,804,160,000,000,000,000,000,000,000 | 46 | tmpfs: fix use-after-free of mempolicy object
The tmpfs remount logic preserves filesystem mempolicy if the mpol=M
option is not specified in the remount request. A new policy can be
specified if mpol=M is given.
Before this patch remounting an mpol bound tmpfs without specifying
mpol= mount option in the remount re... |
void InstanceKlass::metaspace_pointers_do(MetaspaceClosure* it) {
Klass::metaspace_pointers_do(it);
if (log_is_enabled(Trace, cds)) {
ResourceMark rm;
log_trace(cds)("Iter(InstanceKlass): %p (%s)", this, external_name());
}
it->push(&_annotations);
it->push((Klass**)&_array_klasses);
if (!is_rewri... | 1 | [] | jdk17u | f8eb9abe034f7c6bea4da05a9ea42017b3f80730 | 10,853,581,498,898,447,000,000,000,000,000,000,000 | 53 | 8270386: Better verification of scan methods
Reviewed-by: coleenp
Backport-of: ac329cef45979bd0159ecd1347e36f7129bb2ce4 |
static void nft_basechain_hook_init(struct nf_hook_ops *ops, u8 family,
const struct nft_chain_hook *hook,
struct nft_chain *chain)
{
ops->pf = family;
ops->hooknum = hook->num;
ops->priority = hook->priority;
ops->priv = chain;
ops->hook = hook->type->hooks[ops->hooknum];
ops->hook_ops_type... | 0 | [] | net | 520778042ccca019f3ffa136dd0ca565c486cedd | 136,008,447,442,043,600,000,000,000,000,000,000,000 | 11 | netfilter: nf_tables: disallow non-stateful expression in sets earlier
Since 3e135cd499bf ("netfilter: nft_dynset: dynamic stateful expression
instantiation"), it is possible to attach stateful expressions to set
elements.
cd5125d8f518 ("netfilter: nf_tables: split set destruction in deactivate
and destroy phase") in... |
void Compute(OpKernelContext* ctx) override {
const Tensor* hypothesis_indices;
const Tensor* hypothesis_values;
const Tensor* hypothesis_shape;
const Tensor* truth_indices;
const Tensor* truth_values;
const Tensor* truth_shape;
OP_REQUIRES_OK(ctx, ctx->input("hypothesis_indices", &hypothe... | 1 | [
"CWE-787"
] | tensorflow | 30721cf564cb029d34535446d6a5a6357bebc8e7 | 21,516,249,110,451,770,000,000,000,000,000,000,000 | 163 | Fix tf.raw_ops.EditDistance vulnerability with negative indices.
Check that indices are non-negative. Fix several identical code sites.
Clean up grammar in error message.
PiperOrigin-RevId: 445442017 |
static u32 netif_receive_generic_xdp(struct sk_buff *skb,
struct bpf_prog *xdp_prog)
{
struct xdp_buff xdp;
u32 act = XDP_DROP;
void *orig_data;
int hlen, off;
u32 mac_len;
/* Reinjected packets coming from act_mirred or similar should
* not get XDP generic processing.
*/
if (skb_cloned(skb))
re... | 0 | [
"CWE-476"
] | linux | 0ad646c81b2182f7fa67ec0c8c825e0ee165696d | 207,534,206,330,377,460,000,000,000,000,000,000,000 | 59 | tun: call dev_get_valid_name() before register_netdevice()
register_netdevice() could fail early when we have an invalid
dev name, in which case ->ndo_uninit() is not called. For tun
device, this is a problem because a timer etc. are already
initialized and it expects ->ndo_uninit() to clean them up.
We could move th... |
FindEmptyObjectSlot(
TPMI_DH_OBJECT *handle // OUT: (optional)
)
{
UINT32 i;
OBJECT *object;
for(i = 0; i < MAX_LOADED_OBJECTS; i++)
{
object = &s_objects[i];
if(object->attributes.occupied == CLEAR)
{
if(handle)
*handle = i + TRANSIENT_F... | 0 | [
"CWE-119"
] | libtpms | ea62fd9679f8c6fc5e79471b33cfbd8227bfed72 | 157,272,883,971,621,070,000,000,000,000,000,000,000 | 21 | tpm2: Initialize a whole OBJECT before using it
Initialize a whole OBJECT before using it. This is necessary since
an OBJECT may also be used as a HASH_OBJECT via the ANY_OBJECT
union and that HASH_OBJECT can leave bad size inidicators in TPM2B
buffer in the OBJECT. To get rid of this problem we reset the whole
OBJECT... |
compile_length_gimmick_node(GimmickNode* node, regex_t* reg)
{
int len;
switch (node->type) {
case GIMMICK_FAIL:
len = OPSIZE_FAIL;
break;
case GIMMICK_SAVE:
len = OPSIZE_SAVE_VAL;
break;
case GIMMICK_UPDATE_VAR:
len = OPSIZE_UPDATE_VAR;
break;
#ifdef USE_CALLOUT
case GIMMICK_CAL... | 0 | [
"CWE-787"
] | oniguruma | cbe9f8bd9cfc6c3c87a60fbae58fa1a85db59df0 | 301,629,378,858,392,970,000,000,000,000,000,000,000 | 37 | #207: Out-of-bounds write |
GF_Err gf_isom_new_mpha_description(GF_ISOFile *movie, u32 trackNumber, const char *URLname, const char *URNname, u32 *outDescriptionIndex, u8 *dsi, u32 dsi_size)
{
GF_TrackBox *trak;
GF_Err e;
u32 dataRefIndex;
GF_MPEGAudioSampleEntryBox *mpa;
e = CanAccessMovie(movie, GF_ISOM_OPEN_WRITE);
if (e) return e;
if ... | 0 | [
"CWE-476",
"CWE-401"
] | gpac | 328c6d682698fdb9878dbb4f282963d42c538c01 | 243,336,974,421,963,340,000,000,000,000,000,000,000 | 50 | fixed #1756 |
static int scrub_handle_errored_block(struct scrub_block *sblock_to_check)
{
struct scrub_ctx *sctx = sblock_to_check->sctx;
struct btrfs_device *dev;
struct btrfs_fs_info *fs_info;
u64 logical;
unsigned int failed_mirror_index;
unsigned int is_metadata;
unsigned int have_csum;
struct scrub_block *sblocks_for_r... | 0 | [
"CWE-476",
"CWE-284"
] | linux | 09ba3bc9dd150457c506e4661380a6183af651c1 | 124,060,052,205,718,380,000,000,000,000,000,000,000 | 403 | 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 inline void unset_flags(struct v4l2l_buffer *buffer)
{
buffer->buffer.flags &= ~V4L2_BUF_FLAG_QUEUED;
buffer->buffer.flags &= ~V4L2_BUF_FLAG_DONE;
} | 0 | [
"CWE-787"
] | v4l2loopback | 64a216af4c09c9ba9326057d7e78994271827eff | 329,312,678,477,154,760,000,000,000,000,000,000,000 | 5 | add explicit format specifier to printf() invocations
CWE-134 |
test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend)
{
if (cs != &my_charset_bin)
str+= cs->cset->scan(cs, str, strend, MY_SEQ_SPACES);
return (str < strend);
} | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 49,453,546,493,411,330,000,000,000,000,000,000,000 | 6 | 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... |
static void cmd_anal_graph(RCore *core, const char *input) {
RList *list;
const char *arg;
switch (input[0]) {
case 'f': // "agf"
switch (input[1]) {
case 't':// "agft" - tiny graph
r_core_visual_graph (core, NULL, NULL, 2);
break;
case 0:
r_core_visual_graph (core, NULL, NULL, false);
break;
de... | 0 | [
"CWE-416",
"CWE-908"
] | radare2 | 9d348bcc2c4bbd3805e7eec97b594be9febbdf9a | 154,470,319,244,635,500,000,000,000,000,000,000,000 | 127 | Fix #9943 - Invalid free on RAnal.avr |
static int jpc_ppt_dumpparms(jpc_ms_t *ms, FILE *out)
{
jpc_ppt_t *ppt = &ms->parms.ppt;
fprintf(out, "ind=%d; len = %d;\n", ppt->ind, ppt->len);
if (ppt->len > 0) {
fprintf(out, "data =\n");
jas_memdump(out, ppt->data, ppt->len);
}
return 0;
} | 0 | [] | jasper | 4031ca321d8cb5798c316ab39c7a5dc88a61fdd7 | 251,095,650,060,770,830,000,000,000,000,000,000,000 | 10 | Incorporated changes from patch
jasper-1.900.3-libjasper-stepsizes-overflow.patch |
g_file_real_create_readwrite_async (GFile *file,
GFileCreateFlags flags,
int io_priority,
GCancellable *cancellable,
GAsyncReadyCallba... | 0 | [
"CWE-362"
] | glib | d8f8f4d637ce43f8699ba94c9b7648beda0ca174 | 65,419,069,635,901,380,000,000,000,000,000,000,000 | 21 | gfile: Limit access to files when copying
file_copy_fallback creates new files with default permissions and
set the correct permissions after the operation is finished. This
might cause that the files can be accessible by more users during
the operation than expected. Use G_FILE_CREATE_PRIVATE for the new
files to lim... |
static inline ulonglong my_unsigned_round(ulonglong value, ulonglong to)
{
ulonglong tmp= value / to * to;
return (value - tmp < (to >> 1)) ? tmp : tmp + to;
} | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 69,974,430,428,967,810,000,000,000,000,000,000,000 | 5 | 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 int snd_msnd_send_dsp_cmd_chk(struct snd_msnd *chip, u8 cmd)
{
if (snd_msnd_send_dsp_cmd(chip, cmd) == 0)
return 0;
snd_msnd_dsp_full_reset(chip->card);
return snd_msnd_send_dsp_cmd(chip, cmd);
} | 0 | [
"CWE-125",
"CWE-401"
] | linux | 20e2b791796bd68816fa115f12be5320de2b8021 | 42,344,733,889,084,255,000,000,000,000,000,000,000 | 7 | ALSA: msnd: Optimize / harden DSP and MIDI loops
The ISA msnd drivers have loops fetching the ring-buffer head, tail
and size values inside the loops. Such codes are inefficient and
fragile.
This patch optimizes it, and also adds the sanity check to avoid the
endless loops.
Bugzilla: https://bugzilla.kernel.org/sho... |
test2(void)
{
sixel_dither_t *dither = NULL;
int colors;
int nret = EXIT_FAILURE;
#if HAVE_DIAGNOSTIC_DEPRECATED_DECLARATIONS
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
dither = sixel_dither_create(INT_MAX);
#if HAVE_DIAGNOSTIC_DEPRECATED_DECLARATI... | 0 | [
"CWE-200"
] | libsixel | cb373ab6614c910407c5e5a93ab935144e62b037 | 10,568,975,388,933,080,000,000,000,000,000,000,000 | 28 | Avoid illegal memory access problem with 1 color paletted png(#73),
Thanks to HongxuChen. |
static int srpt_map_sg_to_ib_sge(struct srpt_rdma_ch *ch,
struct srpt_send_ioctx *ioctx)
{
struct ib_device *dev = ch->sport->sdev->device;
struct se_cmd *cmd;
struct scatterlist *sg, *sg_orig;
int sg_cnt;
enum dma_data_direction dir;
struct ib_rdma_wr *riu;
struct srp_direct_buf *db;
dma_addr_t dma_addr;
... | 0 | [
"CWE-200",
"CWE-476"
] | linux | 51093254bf879bc9ce96590400a87897c7498463 | 169,464,471,439,502,300,000,000,000,000,000,000,000 | 177 | IB/srpt: Simplify srpt_handle_tsk_mgmt()
Let the target core check task existence instead of the SRP target
driver. Additionally, let the target core check the validity of the
task management request instead of the ib_srpt driver.
This patch fixes the following kernel crash:
BUG: unable to handle kernel NULL pointer... |
event_raise(uschar * action, const uschar * event, uschar * ev_data)
{
uschar * s;
if (action)
{
DEBUG(D_deliver)
debug_printf("Event(%s): event_action=|%s| delivery_IP=%s\n",
event,
action, deliver_host_address);
event_name = event;
event_data = ev_data;
if (!(s = expand_string(action)) && ... | 0 | [
"CWE-78"
] | exim | 7ea1237c783e380d7bdb86c90b13d8203c7ecf26 | 216,233,967,724,866,050,000,000,000,000,000,000,000 | 32 | Events: raise msg:fail:internal & msg:complete for -Mrm. Bug 2310 |
print_16bits_val(netdissect_options *ndo, const uint16_t *dat)
{
ND_PRINT((ndo, "%u", EXTRACT_16BITS(dat)));
} | 0 | [
"CWE-125",
"CWE-787"
] | tcpdump | cc4a7391c616be7a64ed65742ef9ed3f106eb165 | 313,244,280,498,909,800,000,000,000,000,000,000,000 | 4 | CVE-2017-13006/L2TP: Check whether an AVP's content exceeds the AVP length.
It's not good enough to check whether all the data specified by the AVP
length was captured - you also have to check whether that length is
large enough for all the required data in the AVP.
This fixes a buffer over-read discovered by Yannick... |
void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
GBool interpolate,
Stream *maskStr,
int maskWidth, int maskHeight,
GBool maskInvert, GBool maskInterpolate)
{
cairo_t *cr;
cairo_surface_t... | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 27,509,182,132,085,317,000,000,000,000,000,000,000 | 47 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
vte_sequence_handler_ue (VteTerminal *terminal, GValueArray *params)
{
terminal->pvt->screen->defaults.attr.underline = 0;
} | 0 | [] | vte | 58bc3a942f198a1a8788553ca72c19d7c1702b74 | 114,391,493,821,710,880,000,000,000,000,000,000,000 | 4 | fix bug #548272
svn path=/trunk/; revision=2365 |
_tiff_read (thandle_t handle,
tdata_t buf,
tsize_t size)
{
TiffBuffer *buffer = (TiffBuffer *)handle;
if (buffer->pos + size > buffer->buffer_len)
return 0;
memcpy (buf, buffer->buffer + buffer->pos, size);
buffer->pos += size;
return size;
} | 0 | [] | libgxps | 123dd99c6a1ae2ef6fcb5547e51fa58e8c954b51 | 305,040,522,038,793,440,000,000,000,000,000,000,000 | 14 | gxps-images: fix integer overflow in png decoder |
struct iscsi_endpoint *iscsi_lookup_endpoint(u64 handle)
{
struct iscsi_endpoint *ep;
struct device *dev;
dev = class_find_device(&iscsi_endpoint_class, NULL, &handle,
iscsi_match_epid);
if (!dev)
return NULL;
ep = iscsi_dev_to_endpoint(dev);
/*
* we can drop this now because the interface will prevent
... | 0 | [
"CWE-787"
] | linux | ec98ea7070e94cc25a422ec97d1421e28d97b7ee | 270,223,154,145,997,000,000,000,000,000,000,000,000 | 18 | 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:... |
static int __must_check rose_add_node(struct rose_route_struct *rose_route,
struct net_device *dev)
{
struct rose_node *rose_node, *rose_tmpn, *rose_tmpp;
struct rose_neigh *rose_neigh;
int i, res = 0;
spin_lock_bh(&rose_node_list_lock);
spin_lock_bh(&rose_neigh_list_lock);
rose_node = rose_node_list;
while ... | 0 | [
"CWE-20"
] | linux | e0bccd315db0c2f919e7fcf9cb60db21d9986f52 | 258,244,058,415,578,800,000,000,000,000,000,000,000 | 147 | rose: Add length checks to CALL_REQUEST parsing
Define some constant offsets for CALL_REQUEST based on the description
at <http://www.techfest.com/networking/wan/x25plp.htm> and the
definition of ROSE as using 10-digit (5-byte) addresses. Use them
consistently. Validate all implicit and explicit facilities lengths.
... |
static inline struct io_kiocb *io_put_req_find_next(struct io_kiocb *req)
{
struct io_kiocb *nxt = NULL;
if (req_ref_put_and_test(req)) {
if (unlikely(req->flags & IO_REQ_LINK_FLAGS))
nxt = io_req_find_next(req);
io_free_req(req);
}
return nxt;
} | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 257,836,808,179,984,820,000,000,000,000,000,000,000 | 11 | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.