func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
void cancel() override {
for (const auto& it : auths_) {
it->onDestroy();
}
} | 0 | [
"CWE-303",
"CWE-703"
] | envoy | ea39e3cba652bcc4b11bb0d5c62b017e584d2e5a | 113,287,215,406,092,450,000,000,000,000,000,000,000 | 5 | jwt_authn: fix a bug where JWT with wrong issuer is allowed in allow_missing case (#15194)
[jwt] When allow_missing is used inside RequiresAny, the requests with JWT with wrong issuer are accepted. This is a bug, allow_missing should only allow requests without any JWT. This change fixed the above issue by preserving ... |
rsvg_handle_render_cairo (RsvgHandle * handle, cairo_t * cr)
{
return rsvg_handle_render_cairo_sub (handle, cr, NULL);
} | 0 | [] | librsvg | a51919f7e1ca9c535390a746fbf6e28c8402dc61 | 249,541,486,577,534,700,000,000,000,000,000,000,000 | 4 | rsvg: Add rsvg_acquire_node()
This function does proper recursion checks when looking up resources
from URLs and thereby helps avoiding infinite loops when cyclic
references span multiple types of elements. |
gimp_channel_invert (GimpChannel *channel,
gboolean push_undo)
{
g_return_if_fail (GIMP_IS_CHANNEL (channel));
if (! gimp_item_is_attached (GIMP_ITEM (channel)))
push_undo = FALSE;
GIMP_CHANNEL_GET_CLASS (channel)->invert (channel, push_undo);
} | 0 | [
"CWE-703"
] | gimp | 6ab90ecbbd7cc95901933f62227fd140c0576d55 | 242,799,530,745,939,640,000,000,000,000,000,000,000 | 10 | app: fix #8230 crash in gimp_layer_invalidate_boundary when channel is NULL
gimp_channel_is_empty returns FALSE if channel is NULL. This causes
gimp_layer_invalidate_boundary to crash if the mask channel is NULL.
With a NULL channel gimp_channel_is_empty should return TRUE, just like
the similar gimp_image_is_empty d... |
static int rtnl_fill_ifinfo(struct sk_buff *skb, struct net_device *dev,
int type, u32 pid, u32 seq, u32 change,
unsigned int flags, u32 ext_filter_mask)
{
struct ifinfomsg *ifm;
struct nlmsghdr *nlh;
struct rtnl_link_stats64 temp;
const struct rtnl_link_stats64 *stats;
struct nlattr *attr, *af_spec;... | 0 | [
"CWE-264"
] | net | 90f62cf30a78721641e08737bda787552428061e | 207,162,600,916,182,300,000,000,000,000,000,000,000 | 197 | net: Use netlink_ns_capable to verify the permisions of netlink messages
It is possible by passing a netlink socket to a more privileged
executable and then to fool that executable into writing to the socket
data that happens to be valid netlink message to do something that
privileged executable did not intend to do.
... |
static int entry_sort_cmp(const void *a, const void *b)
{
const git_tree_entry *e1 = (const git_tree_entry *)a;
const git_tree_entry *e2 = (const git_tree_entry *)b;
return git_path_cmp(
e1->filename, e1->filename_len, git_tree_entry__is_tree(e1),
e2->filename, e2->filename_len, git_tree_entry__is_tree(e2),
g... | 0 | [
"CWE-20"
] | libgit2 | 928429c5c96a701bcbcafacb2421a82602b36915 | 66,068,606,009,693,950,000,000,000,000,000,000,000 | 10 | tree: Check for `.git` with case insensitivy |
static struct elevator_type *elevator_get(struct request_queue *q,
const char *name, bool try_loading)
{
struct elevator_type *e;
spin_lock(&elv_list_lock);
e = elevator_find(name);
if (!e && try_loading) {
spin_unlock(&elv_list_lock);
request_module("%s-iosched", name);
spin_lock(&elv_list_lock);
... | 0 | [
"CWE-416"
] | linux | c3e2219216c92919a6bd1711f340f5faa98695e6 | 139,910,425,761,200,880,000,000,000,000,000,000,000 | 21 | block: free sched's request pool in blk_cleanup_queue
In theory, IO scheduler belongs to request queue, and the request pool
of sched tags belongs to the request queue too.
However, the current tags allocation interfaces are re-used for both
driver tags and sched tags, and driver tags is definitely host wide,
and doe... |
//! Convert pixel values from XYZ to Lab color spaces.
CImg<T>& XYZtoLab(const bool use_D65=true) {
#define _cimg_Labf(x) (24389*(x)>216?cimg::cbrt(x):(24389*(x)/27 + 16)/116)
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"XYZtoLab(): Instance is... | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 60,119,640,219,683,360,000,000,000,000,000,000,000 | 25 | Fix other issues in 'CImg<T>::load_bmp()'. |
static inline unsigned int userpolicy_type_attrsize(void)
{
#ifdef CONFIG_XFRM_SUB_POLICY
return nla_total_size(sizeof(struct xfrm_userpolicy_type));
#else
return 0;
#endif
} | 0 | [
"CWE-125"
] | linux | b805d78d300bcf2c83d6df7da0c818b0fee41427 | 140,903,219,678,794,410,000,000,000,000,000,000,000 | 8 | xfrm: policy: Fix out-of-bound array accesses in __xfrm_policy_unlink
UBSAN report this:
UBSAN: Undefined behaviour in net/xfrm/xfrm_policy.c:1289:24
index 6 is out of range for type 'unsigned int [6]'
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 4.4.162-514.55.6.9.x86_64+ #13
Hardware name: QEMU Standard PC (i440FX + P... |
static void EventRegionNvmCtxChanged( void )
{
CallNvmCtxCallback( LORAMAC_NVMCTXMODULE_REGION );
}
| 0 | [
"CWE-120",
"CWE-787"
] | LoRaMac-node | e3063a91daa7ad8a687223efa63079f0c24568e4 | 262,731,171,495,479,970,000,000,000,000,000,000,000 | 4 | Added received buffer size checks. |
int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen)
{
word32 seqSz, verSz, rawLen, intTotalLen = 0;
word32 sizes[RSA_INTS];
int i, j, outLen, ret = 0, mpSz;
byte seq[MAX_SEQ_SZ];
byte ver[MAX_VERSION_SZ];
byte* tmps[RSA_INTS];
if (!key)
return BAD_FUNC_ARG;
if (ke... | 0 | [
"CWE-125",
"CWE-345"
] | wolfssl | f93083be72a3b3d956b52a7ec13f307a27b6e093 | 135,761,366,280,866,350,000,000,000,000,000,000,000 | 70 | OCSP: improve handling of OCSP no check extension |
static void mmrot3_(register char *a, register char *b, register char *c, int mmkind, size_t size, size_t high, size_t low)
{
register int s;
if (mmkind >= 0) {
if (mmkind > 0) {
register char *t = a + high;
do {
s = A[0]; A[0] = B[0]; B[0] = C[0]; C[0] = s;
s = A[1]; A[1] = B[1]; B[1] = C... | 0 | [
"CWE-119"
] | ruby | 60c29bbbf6574e0e947c56e71c3c3ca11620ee15 | 27,358,123,120,630,976,000,000,000,000,000,000,000 | 22 | merge revision(s) 43775:
* util.c (ruby_strtod): ignore too long fraction part, which does not
affect the result.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@43776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
static struct inode *read_inode(unsigned int start_block, unsigned int offset)
{
static union squashfs_inode_header_2 header;
long long start = sBlk.s.inode_table_start + start_block;
long long st = start;
unsigned int off = offset;
static struct inode i;
int res;
TRACE("read_inode: reading inode [%d:%d]\n", st... | 0 | [
"CWE-200",
"CWE-59",
"CWE-22"
] | squashfs-tools | e0485802ec72996c20026da320650d8362f555bd | 234,659,751,213,590,960,000,000,000,000,000,000,000 | 169 | Unsquashfs: additional write outside destination directory exploit fix
An issue on github (https://github.com/plougher/squashfs-tools/issues/72)
showed how some specially crafted Squashfs filesystems containing
invalid file names (with '/' and '..') can cause Unsquashfs to write
files outside of the destination direct... |
do_check_pin (app_t app, const char *keyidstr,
gpg_error_t (*pincb)(void*, const char *, char **),
void *pincb_arg)
{
unsigned char tmp_sn[20];
const char *s;
int n;
int admin_pin = 0;
if (!keyidstr || !*keyidstr)
return gpg_error (GPG_ERR_INV_VALUE);
/* Check whether an Op... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 232,201,815,717,770,920,000,000,000,000,000,000,000 | 77 | 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 ... |
hook_hdata (struct t_weechat_plugin *plugin, const char *hdata_name,
const char *description,
t_hook_callback_hdata *callback, void *callback_data)
{
struct t_hook *new_hook;
struct t_hook_hdata *new_hook_hdata;
int priority;
const char *ptr_hdata_name;
if (!hdata_name || !h... | 0 | [
"CWE-20"
] | weechat | efb795c74fe954b9544074aafcebb1be4452b03a | 134,950,912,302,220,180,000,000,000,000,000,000,000 | 36 | core: do not call shell to execute command in hook_process (fix security problem when a plugin/script gives untrusted command) (bug #37764) |
int idr_get_new_above(struct idr *idp, void *ptr, int starting_id, int *id)
{
struct idr_layer *pa[MAX_IDR_LEVEL + 1];
int rv;
rv = idr_get_empty_slot(idp, starting_id, pa, 0, idp);
if (rv < 0)
return rv == -ENOMEM ? -EAGAIN : rv;
idr_fill_slot(ptr, rv, pa);
*id = rv;
return 0;
} | 0 | [] | linux | 326cf0f0f308933c10236280a322031f0097205d | 63,099,574,184,187,520,000,000,000,000,000,000,000 | 13 | idr: fix top layer handling
Most functions in idr fail to deal with the high bits when the idr
tree grows to the maximum height.
* idr_get_empty_slot() stops growing idr tree once the depth reaches
MAX_IDR_LEVEL - 1, which is one depth shallower than necessary to
cover the whole range. The function doesn't even ... |
static bool fix_fields_part_func(THD *thd, Item* func_expr, TABLE *table,
bool is_sub_part, bool is_create_table_ind)
{
partition_info *part_info= table->part_info;
bool result= TRUE;
int error;
LEX *old_lex= thd->lex;
LEX lex;
DBUG_ENTER("fix_fields_part_func");
if (init... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 135,036,360,476,013,930,000,000,000,000,000,000,000 | 90 | 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. |
ieee80211_rx_radiotap_hdrlen(struct ieee80211_local *local,
struct ieee80211_rx_status *status,
struct sk_buff *skb)
{
int len;
/* always present fields */
len = sizeof(struct ieee80211_radiotap_header) + 8;
/* allocate extra bitmaps */
if (status->chains)
len += 4 * hweight8(status->chains);
... | 0 | [] | linux | 588f7d39b3592a36fb7702ae3b8bdd9be4621e2f | 277,529,209,247,703,470,000,000,000,000,000,000,000 | 108 | mac80211: drop robust management frames from unknown TA
When receiving a robust management frame, drop it if we don't have
rx->sta since then we don't have a security association and thus
couldn't possibly validate the frame.
Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com> |
ssize_t rdbSaveStringObject(rio *rdb, robj *obj) {
/* Avoid to decode the object, then encode it again, if the
* object is already integer encoded. */
if (obj->encoding == OBJ_ENCODING_INT) {
return rdbSaveLongLongAsStringObject(rdb,(long)obj->ptr);
} else {
serverAssertWithInfo(NULL,ob... | 0 | [
"CWE-190"
] | redis | a30d367a71b7017581cf1ca104242a3c644dec0f | 56,570,234,507,040,230,000,000,000,000,000,000,000 | 10 | Fix Integer overflow issue with intsets (CVE-2021-32687)
The vulnerability involves changing the default set-max-intset-entries
configuration parameter to a very large value and constructing specially
crafted commands to manipulate sets |
static long __sched alarm_timer_nsleep_restart(struct restart_block *restart)
{
enum alarmtimer_type type = restart->nanosleep.clockid;
ktime_t exp = restart->nanosleep.expires;
struct alarm alarm;
alarm_init_on_stack(&alarm, type, alarmtimer_nsleep_wakeup);
return alarmtimer_do_nsleep(&alarm, exp, type);
} | 0 | [
"CWE-190"
] | linux | 5f936e19cc0ef97dbe3a56e9498922ad5ba1edef | 268,850,322,167,368,770,000,000,000,000,000,000,000 | 10 | alarmtimer: Prevent overflow for relative nanosleep
Air Icy reported:
UBSAN: Undefined behaviour in kernel/time/alarmtimer.c:811:7
signed integer overflow:
1529859276030040771 + 9223372036854775807 cannot be represented in type 'long long int'
Call Trace:
alarm_timer_nsleep+0x44c/0x510 kernel/time/alarmtim... |
static void oss_poll_out (HWVoiceOut *hw)
{
OSSVoiceOut *oss = (OSSVoiceOut *) hw;
qemu_set_fd_handler(oss->fd, NULL, oss_helper_poll_out, hw->s);
} | 0 | [
"CWE-369"
] | qemu | 7a4ede0047a8613b0e3b72c9d351038f013dd357 | 131,973,668,741,715,920,000,000,000,000,000,000,000 | 6 | audio/oss: fix buffer pos calculation
Fixes: 3ba4066d085f ("ossaudio: port to the new audio backend api")
Reported-by: ziming zhang <ezrakiez@gmail.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20200120101804.29578-1-kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
bool PDFDoc::checkEncryption(const GooString *ownerPassword, const GooString *userPassword) {
bool encrypted;
bool ret;
Object encrypt = xref->getTrailerDict()->dictLookup("Encrypt");
if ((encrypted = encrypt.isDict())) {
if ((secHdlr = SecurityHandler::make(this, &encrypt))) {
if (secHdlr->isUnencry... | 0 | [
"CWE-20"
] | poppler | 9fd5ec0e6e5f763b190f2a55ceb5427cfe851d5f | 162,376,842,478,673,380,000,000,000,000,000,000,000 | 34 | PDFDoc::setup: Fix return value
At that point xref can have gone wrong since extractPDFSubtype() can
have caused a reconstruct that broke stuff so instead of unconditionally
returning true, return xref->isOk()
Fixes #706 |
void kvmppc_free_lpid(long lpid)
{
clear_bit(lpid, lpid_inuse);
} | 0 | [
"CWE-476"
] | linux | ac64115a66c18c01745bbd3c47a36b124e5fd8c0 | 102,223,311,449,872,870,000,000,000,000,000,000,000 | 4 | KVM: PPC: Fix oops when checking KVM_CAP_PPC_HTM
The following program causes a kernel oops:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/kvm.h>
main()
{
int fd = open("/dev/kvm", O_RDWR);
ioctl(fd, KVM_CHECK_EXTENSION, KVM_CAP_PPC_HTM);
}
This happe... |
extern int main(int argc, char* argv[])
{
err_file = stdout;
#ifndef POSIX_TEST
region = onig_region_new();
#endif
#ifdef POSIX_TEST
reg_set_encoding(REG_POSIX_ENCODING_UTF16_BE);
#else
ENC = ONIG_ENCODING_UTF16_BE;
#endif
x2("\000\000", "\000\000", 0, 0);
x2("\000^\000\000", "\000\000", 0, 0);
x2("\000$... | 0 | [
"CWE-125"
] | oniguruma | 65a9b1aa03c9bc2dc01b074295b9603232cb3b78 | 264,407,264,333,786,560,000,000,000,000,000,000,000 | 707 | onig-5.9.2 |
TEST_F(QuantizedConv2DTest, SmallWithNoZero) {
const int stride = 1;
TF_ASSERT_OK(NodeDefBuilder("quantized_conv_op", "QuantizedConv2D")
.Input(FakeInput(DT_QUINT8))
.Input(FakeInput(DT_QUINT8))
.Input(FakeInput(DT_FLOAT))
.Input(FakeInput(... | 0 | [
"CWE-20",
"CWE-476"
] | tensorflow | 0f0b080ecde4d3dfec158d6f60da34d5e31693c4 | 238,652,105,338,952,400,000,000,000,000,000,000,000 | 61 | Fix undefined behavior in QuantizedConv2D
Added more input validation and tests. Prior to this, we could get
`nullptr` exceptions when attempting to access 0th elements of 0-sized
inputs, leading to security vulnerability bugs.
Also needed to modify `quantized_conv_ops_test.cc` for consistency.
Previously the CPU ke... |
}
//! Load an image from a video file using the external tool 'ffmpeg' \newinstance. | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 321,757,895,303,088,530,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static inline int part_val_int(Item *item_expr, longlong *result)
{
*result= item_expr->val_int();
if (item_expr->null_value)
{
if (current_thd->is_error())
return TRUE;
else
*result= LONGLONG_MIN;
}
return FALSE;
} | 0 | [] | mysql-server | be901b60ae59c93848c829d1b0b2cb523ab8692e | 55,427,435,802,190,280,000,000,000,000,000,000,000 | 12 | Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT.
Analysis
========
CREATE TABLE of InnoDB table with a partition name
which exceeds the path limit can cause the server
to exit.
During the preparation of the partition name,
there was no check to identify whether the complete
path name for partition exceeds the max ... |
inline void PadImpl(const tflite::PadParams& op_params,
const RuntimeShape& input_shape, const T* input_data,
const P* pad_value_ptr, const RuntimeShape& output_shape,
T* output_data) {
ruy::profiler::ScopeLabel label("PadImpl");
const int max_supported_di... | 0 | [
"CWE-476",
"CWE-369"
] | tensorflow | 15691e456c7dc9bd6be203b09765b063bf4a380c | 17,303,214,636,121,467,000,000,000,000,000,000,000 | 131 | Prevent dereferencing of null pointers in TFLite's `add.cc`.
PiperOrigin-RevId: 387244946
Change-Id: I56094233327fbd8439b92e1dbb1262176e00eeb9 |
static void Fill(const bfloat16* data, size_t n, TensorProto* proto) {
proto->mutable_half_val()->Reserve(n);
for (size_t i = 0; i < n; ++i) {
proto->mutable_half_val()->AddAlreadyReserved(
Eigen::numext::bit_cast<uint16>(data[i]));
}
} | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 231,852,132,544,929,630,000,000,000,000,000,000,000 | 7 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
shmem_alloc_page(gfp_t gfp, struct shmem_inode_info *info,
unsigned long idx)
{
struct vm_area_struct pvma;
struct page *page;
memset(&pvma, 0, sizeof(struct vm_area_struct));
pvma.vm_policy = mpol_shared_policy_lookup(&info->policy, idx);
pvma.vm_pgoff = idx;
pvma.vm_end = PAGE_SIZE;
page = alloc_page_vma(g... | 1 | [
"CWE-200"
] | linux-2.6 | e84e2e132c9c66d8498e7710d4ea532d1feaaac5 | 209,078,005,530,362,280,000,000,000,000,000,000,000 | 14 | tmpfs: restore missing clear_highpage
tmpfs was misconverted to __GFP_ZERO in 2.6.11. There's an unusual case in
which shmem_getpage receives the page from its caller instead of allocating.
We must cover this case by clear_highpage before SetPageUptodate, as before.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Sig... |
xmlValidateAttributeDecl(xmlValidCtxtPtr ctxt, xmlDocPtr doc,
xmlAttributePtr attr) {
int ret = 1;
int val;
CHECK_DTD;
if(attr == NULL) return(1);
/* Attribute Default Legal */
/* Enumeration */
if (attr->defaultValue != NULL) {
val = xmlValidateAttributeValueInter... | 0 | [
"CWE-416"
] | libxml2 | 652dd12a858989b14eed4e84e453059cd3ba340e | 317,070,101,847,835,080,000,000,000,000,000,000,000 | 93 | [CVE-2022-23308] Use-after-free of ID and IDREF attributes
If a document is parsed with XML_PARSE_DTDVALID and without
XML_PARSE_NOENT, the value of ID attributes has to be normalized after
potentially expanding entities in xmlRemoveID. Otherwise, later calls
to xmlGetID can return a pointer to previously freed memory... |
const char *gf_m4a_get_profile_name(u8 audio_pl)
{
u32 i, count = GF_ARRAY_LENGTH(M4AProfiles);
for (i=0; i<count; i++) {
if ((u32) audio_pl==M4AProfiles[i].value)
return M4AProfiles[i].name;
}
return "ISO Reserved / User Private";
} | 0 | [
"CWE-190",
"CWE-787"
] | gpac | 51cdb67ff7c5f1242ac58c5aa603ceaf1793b788 | 188,314,150,235,969,260,000,000,000,000,000,000,000 | 9 | add safety in avc/hevc/vvc sps/pps/vps ID check - cf #1720 #1721 #1722 |
static u32 clock_divider_to_resolution(u16 divider)
{
/*
* Resolution is the duration of 1 tick of the readable portion of
* of the pulse width counter as read from the FIFO. The two lsb's are
* not readable, hence the << 2. This function returns ns.
*/
return DIV_ROUND_CLOSEST((1 << 2) * ((u32) divider + ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a7b2df76b42bdd026e3106cf2ba97db41345a177 | 304,812,195,088,660,070,000,000,000,000,000,000,000 | 10 | media: rc: prevent memory leak in cx23888_ir_probe
In cx23888_ir_probe if kfifo_alloc fails the allocated memory for state
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
win_strncat_from_utf16be(struct archive_string *as, const void *_p,
size_t bytes, struct archive_string_conv *sc)
{
return (win_strncat_from_utf16(as, _p, bytes, sc, 1));
} | 0 | [
"CWE-476"
] | libarchive | 42a3408ac7df1e69bea9ea12b72e14f59f7400c0 | 27,234,515,685,164,840,000,000,000,000,000,000,000 | 5 | archive_strncat_l(): allocate and do not convert if length == 0
This ensures e.g. that archive_mstring_copy_mbs_len_l() does not set
aes_set = AES_SET_MBS with aes_mbs.s == NULL.
Resolves possible null-pointer dereference reported by OSS-Fuzz.
Reported-By: OSS-Fuzz issue 286 |
PackLinuxElf::addStubEntrySections(Filter const *)
{
addLoader("ELFMAINX", NULL);
if (hasLoaderSection("ELFMAINXu")) {
// brk() trouble if static
addLoader("ELFMAINXu", NULL);
}
//addLoader(getDecompressorSections(), NULL);
addLoader(
( M_IS_NRV2E(ph.method) ? "NRV_HEAD,NR... | 0 | [
"CWE-415"
] | upx | d9288213ec156dffc435566b9d393d23e87c6914 | 9,811,408,151,070,810,000,000,000,000,000,000,000 | 35 | More checking of PT_DYNAMIC and its contents.
https://github.com/upx/upx/issues/206
modified: p_lx_elf.cpp |
ConnectionImpl::Http2Options::Http2Options(const Http2Settings& http2_settings) {
nghttp2_option_new(&options_);
// Currently we do not do anything with stream priority. Setting the following option prevents
// nghttp2 from keeping around closed streams for use during stream priority dependency graph
// calcula... | 0 | [
"CWE-400",
"CWE-703"
] | envoy | afc39bea36fd436e54262f150c009e8d72db5014 | 208,995,612,480,236,600,000,000,000,000,000,000,000 | 21 | Track byteSize of HeaderMap internally.
Introduces a cached byte size updated internally in HeaderMap. The value
is stored as an optional, and is cleared whenever a non-const pointer or
reference to a HeaderEntry is accessed. The cached value can be set with
refreshByteSize() which performs an iteration over the Heade... |
static void havingToWhere(Parse *pParse, Select *p){
Walker sWalker;
memset(&sWalker, 0, sizeof(sWalker));
sWalker.pParse = pParse;
sWalker.xExprCallback = havingToWhereExprCb;
sWalker.u.pSelect = p;
sqlite3WalkExpr(&sWalker, p->pHaving);
#if SELECTTRACE_ENABLED
if( sWalker.eCode && (sqlite3SelectTrace & ... | 0 | [
"CWE-20"
] | sqlite | e59c562b3f6894f84c715772c4b116d7b5c01348 | 112,581,367,539,307,330,000,000,000,000,000,000,000 | 14 | Fix a crash that could occur if a sub-select that uses both DISTINCT and window functions also used an ORDER BY that is the same as its select list.
FossilOrigin-Name: bcdd66c1691955c697f3d756c2b035acfe98f6aad72e90b0021bab6e9023b3ba |
void ecryptfs_encode_for_filename(unsigned char *dst, size_t *dst_size,
unsigned char *src, size_t src_size)
{
size_t num_blocks;
size_t block_num = 0;
size_t dst_offset = 0;
unsigned char last_block[3];
if (src_size == 0) {
(*dst_size) = 0;
goto out;
}
num_blocks = (src_size / 3);
if ((src_size % 3)... | 0 | [
"CWE-189"
] | linux-2.6 | 8faece5f906725c10e7a1f6caf84452abadbdc7b | 203,162,188,491,581,320,000,000,000,000,000,000,000 | 54 | eCryptfs: Allocate a variable number of pages for file headers
When allocating the memory used to store the eCryptfs header contents, a
single, zeroed page was being allocated with get_zeroed_page().
However, the size of an eCryptfs header is either PAGE_CACHE_SIZE or
ECRYPTFS_MINIMUM_HEADER_EXTENT_SIZE (8192), whiche... |
static void * dev_seq_start(struct seq_file *s, loff_t *pos)
{
struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL);
s->private = it;
if (! it)
return NULL;
it->index = *pos;
it->max = sg_last_dev();
if (it->index >= it->max)
return NULL;
return it;
} | 0 | [
"CWE-190",
"CWE-189"
] | linux | fdc81f45e9f57858da6351836507fbcf1b7583ee | 172,777,189,986,392,400,000,000,000,000,000,000,000 | 14 | sg_start_req(): use import_iovec()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
trash_or_delete_files (GtkWindow *parent_window,
const GList *files,
gboolean delete_if_all_already_in_trash)
{
GList *locations;
const GList *node;
locations = NULL;
for (node = files; node != NULL; node = node->next)
{
locations = g_list... | 0 | [
"CWE-20"
] | nautilus | 1630f53481f445ada0a455e9979236d31a8d3bb0 | 335,296,150,937,749,320,000,000,000,000,000,000,000 | 21 | mime-actions: use file metadata for trusting desktop files
Currently we only trust desktop files that have the executable bit
set, and don't replace the displayed icon or the displayed name until
it's trusted, which prevents for running random programs by a malicious
desktop file.
However, the executable permission i... |
CodecClientProd::CodecClientProd(Type type, Network::ClientConnectionPtr&& connection,
Upstream::HostDescriptionConstSharedPtr host,
Event::Dispatcher& dispatcher)
: CodecClient(type, std::move(connection), host, dispatcher) {
switch (type) {
ca... | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 35,567,380,793,674,184,000,000,000,000,000,000,000 | 27 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
json_object *LUKS2_get_segment_jobj(struct luks2_hdr *hdr, int segment)
{
if (!hdr)
return NULL;
if (segment == CRYPT_DEFAULT_SEGMENT)
segment = LUKS2_get_default_segment(hdr);
return json_segments_get_segment(json_get_segments_jobj(hdr->jobj), segment);
} | 0 | [
"CWE-787"
] | cryptsetup | 52f5cb8cedf22fb3e14c744814ec8af7614146c7 | 327,526,157,637,610,050,000,000,000,000,000,000,000 | 10 | Check segment gaps regardless of heap space.
Segments are validated in hdr_validate_segments. Gaps in segment keys
are detected when collecting offsets. But if an invalid segment is very
large, larger than count, it could happen that cryptsetup is unable to
allocate enough memory, not giving a clue about what actually... |
static void ptrace_exit(struct task_struct *parent, struct list_head *dead)
{
struct task_struct *p, *n;
int ign = -1;
list_for_each_entry_safe(p, n, &parent->ptraced, ptrace_entry) {
__ptrace_unlink(p);
if (p->exit_state != EXIT_ZOMBIE)
continue;
/*
* If it's a zombie, our attachedness prevented norm... | 0 | [
"CWE-284",
"CWE-264"
] | linux | 8141c7f3e7aee618312fa1c15109e1219de784a7 | 183,578,624,100,654,920,000,000,000,000,000,000,000 | 42 | Move "exit_robust_list" into mm_release()
We don't want to get rid of the futexes just at exit() time, we want to
drop them when doing an execve() too, since that gets rid of the
previous VM image too.
Doing it at mm_release() time means that we automatically always do it
when we disassociate a VM map from the task.
... |
ovs_instruction_type_from_ofpact_type(enum ofpact_type type)
{
switch (type) {
case OFPACT_METER:
return OVSINST_OFPIT13_METER;
case OFPACT_CLEAR_ACTIONS:
return OVSINST_OFPIT11_CLEAR_ACTIONS;
case OFPACT_WRITE_ACTIONS:
return OVSINST_OFPIT11_WRITE_ACTIONS;
case OFPACT_WRITE_... | 0 | [
"CWE-416"
] | ovs | 65c61b0c23a0d474696d7b1cea522a5016a8aeb3 | 14,687,905,183,443,931,000,000,000,000,000,000,000 | 69 | ofp-actions: Fix use-after-free while decoding RAW_ENCAP.
While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate
ofpbuf if there is no enough space left. However, function
'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap'
structure leading to write-after-free and incorrect decoding.
==3... |
void fatal(const char* s, int code)
{
static int recurse_code = 0;
if (recurse_code) {
/* We were called recursively. Just give up */
proc_cleanup();
exit(recurse_code);
}
recurse_code = code;
if (httpd_out) {
prot_printf(httpd_out,
"HTTP/1.1 %s\r\n"
"Content-Type: text/plain\r\n"
... | 0 | [
"CWE-787"
] | cyrus-imapd | a5779db8163b99463e25e7c476f9cbba438b65f3 | 193,298,407,993,100,600,000,000,000,000,000,000,000 | 22 | HTTP: don't overrun buffer when parsing strings with sscanf() |
inline static void _slurm_rpc_accounting_first_reg(slurm_msg_t *msg)
{
uid_t uid = g_slurm_auth_get_uid(msg->auth_cred,
slurmctld_config.auth_info);
time_t event_time = time(NULL);
DEF_TIMERS;
START_TIMER;
debug2("Processing RPC: ACCOUNTING_FIRST_REG from uid=%d", uid);
if (!validate_super_user(uid)) {
... | 0 | [
"CWE-20"
] | slurm | 033dc0d1d28b8d2ba1a5187f564a01c15187eb4e | 201,845,081,218,345,730,000,000,000,000,000,000,000 | 20 | Fix insecure handling of job requested gid.
Only trust MUNGE signed values, unless the RPC was signed by
SlurmUser or root.
CVE-2018-10995. |
static int ipv4_nlattr_to_tuple(struct nlattr *tb[],
struct nf_conntrack_tuple *t,
u_int32_t flags)
{
if (flags & CTA_FILTER_FLAG(CTA_IP_SRC)) {
if (!tb[CTA_IP_V4_SRC])
return -EINVAL;
t->src.u3.ip = nla_get_in_addr(tb[CTA_IP_V4_SRC]);
}
if (flags & CTA_FILTER_FLAG(CTA_IP_DST)) {
if (!tb[CTA_IP_V4... | 0 | [
"CWE-120"
] | linux | 1cc5ef91d2ff94d2bf2de3b3585423e8a1051cb6 | 161,705,681,946,750,810,000,000,000,000,000,000,000 | 20 | netfilter: ctnetlink: add a range check for l3/l4 protonum
The indexes to the nf_nat_l[34]protos arrays come from userspace. So
check the tuple's family, e.g. l3num, when creating the conntrack in
order to prevent an OOB memory access during setup. Here is an example
kernel panic on 4.14.180 when userspace passes in ... |
void Magick::Image::modifyImage(void)
{
if (!_imgRef->isShared())
return;
GetPPException;
replaceImage(CloneImage(image(),0,0,MagickTrue,exceptionInfo));
ThrowImageException;
} | 0 | [
"CWE-416"
] | ImageMagick | 8c35502217c1879cb8257c617007282eee3fe1cc | 125,818,860,122,850,150,000,000,000,000,000,000,000 | 9 | Added missing return to avoid use after free. |
static int translate_compat_table(struct net *net,
struct xt_table_info **pinfo,
void **pentry0,
const struct compat_arpt_replace *compatr)
{
unsigned int i, j;
struct xt_table_info *newinfo, *info;
void *pos, *entry0, *entry1;
struct compat_arpt_entry *iter0;
struct arpt_replace repl;
unsigned ... | 1 | [
"CWE-787"
] | linux | b29c457a6511435960115c0f548c4360d5f4801d | 126,618,673,444,043,070,000,000,000,000,000,000,000 | 91 | netfilter: x_tables: fix compat match/target pad out-of-bound write
xt_compat_match/target_from_user doesn't check that zeroing the area
to start of next rule won't write past end of allocated ruleset blob.
Remove this code and zero the entire blob beforehand.
Reported-by: syzbot+cfc0247ac173f597aaaa@syzkaller.appsp... |
static int rawv6_push_pending_frames(struct sock *sk, struct flowi6 *fl6,
struct raw6_sock *rp)
{
struct sk_buff *skb;
int err = 0;
int offset;
int len;
int total_len;
__wsum tmp_csum;
__sum16 csum;
if (!rp->checksum)
goto send;
if ((skb = skb_peek(&sk->sk_write_queue)) == NULL)
goto out;
offs... | 0 | [
"CWE-20"
] | net | bceaa90240b6019ed73b49965eac7d167610be69 | 156,491,240,114,943,050,000,000,000,000,000,000,000 | 75 | inet: prevent leakage of uninitialized memory to user in recv syscalls
Only update *addr_len when we actually fill in sockaddr, otherwise we
can return uninitialized memory from the stack to the caller in the
recvfrom, recvmmsg and recvmsg syscalls. Drop the the (addr_len == NULL)
checks because we only get called wit... |
build_sig_subpkt_from_sig( PKT_signature *sig )
{
u32 u;
byte buf[8];
u = sig->keyid[0];
buf[0] = (u >> 24) & 0xff;
buf[1] = (u >> 16) & 0xff;
buf[2] = (u >> 8) & 0xff;
buf[3] = u & 0xff;
u = sig->keyid[1];
buf[4] = (u >> 24) & 0xff;
buf[5] = (u >> 16) & 0xff;
buf[6] = (u ... | 0 | [
"CWE-20"
] | gnupg | 2183683bd633818dd031b090b5530951de76f392 | 239,552,413,506,505,620,000,000,000,000,000,000,000 | 45 | 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 ... |
void CClient::ParsePass(const CString& sAuthLine) {
// [user[@identifier][/network]:]password
const size_t uColon = sAuthLine.find(":");
if (uColon != CString::npos) {
m_sPass = sAuthLine.substr(uColon + 1);
ParseUser(sAuthLine.substr(0, uColon));
} else {
m_sPass = sAuthLine;
... | 0 | [
"CWE-476"
] | znc | 2390ad111bde16a78c98ac44572090b33c3bd2d8 | 290,495,138,454,703,040,000,000,000,000,000,000,000 | 12 | Fix null pointer dereference in echo-message
The bug was introduced while fixing #1705. If a client did not enable
echo-message, and doesn't have a network, it crashes.
Thanks to LunarBNC for reporting this |
static int mem_cgroup_count_precharge_pte_range(pmd_t *pmd,
unsigned long addr, unsigned long end,
struct mm_walk *walk)
{
struct vm_area_struct *vma = walk->private;
pte_t *pte;
spinlock_t *ptl;
split_huge_page_pmd(walk->mm, pmd);
if (pmd_trans_unstable(pmd))
return 0;
pte = pte_offset_map_lock(vma... | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 4,716,534,649,964,582,400,000,000,000,000,000,000 | 21 | mm: thp: fix pmd_bad() triggering in code paths holding mmap_sem read mode
In some cases it may happen that pmd_none_or_clear_bad() is called with
the mmap_sem hold in read mode. In those cases the huge page faults can
allocate hugepmds under pmd_none_or_clear_bad() and that can trigger a
false positive from pmd_bad(... |
struct agp_memory *agp_generic_alloc_user(size_t page_count, int type)
{
struct agp_memory *new;
int i;
int pages;
pages = (page_count + ENTRIES_PER_PAGE - 1) / ENTRIES_PER_PAGE;
new = agp_create_user_memory(page_count);
if (new == NULL)
return NULL;
for (i = 0; i < page_count; i++)
new->pages[i] = NULL;
... | 0 | [
"CWE-190"
] | linux-2.6 | 194b3da873fd334ef183806db751473512af29ce | 250,260,074,882,729,970,000,000,000,000,000,000,000 | 19 | agp: fix arbitrary kernel memory writes
pg_start is copied from userspace on AGPIOC_BIND and AGPIOC_UNBIND ioctl
cmds of agp_ioctl() and passed to agpioc_bind_wrap(). As said in the
comment, (pg_start + mem->page_count) may wrap in case of AGPIOC_BIND,
and it is not checked at all in case of AGPIOC_UNBIND. As a resu... |
void CLASS foveon_interpolate()
{
static const short hood[] = {-1, -1, -1, 0, -1, 1, 0, -1, 0, 1, 1, -1, 1, 0, 1, 1};
short *pix, prev[3], *curve[8], (*shrink)[3];
float cfilt = 0, ddft[3][3][2], ppm[3][3][3];
float cam_xyz[3][3], correct[3][3], last[3][3], trans[3][3];
float chroma_dq[3], color_dq[3], diag[3... | 0 | [
"CWE-476",
"CWE-119"
] | LibRaw | d7c3d2cb460be10a3ea7b32e9443a83c243b2251 | 249,975,163,494,491,500,000,000,000,000,000,000,000 | 438 | Secunia SA75000 advisory: several buffer overruns |
static int pxa2xx_i2c_tx(I2CSlave *i2c, uint8_t data)
{
PXA2xxI2CSlaveState *slave = PXA2XX_I2C_SLAVE(i2c);
PXA2xxI2CState *s = slave->host;
if ((s->control & (1 << 14)) || !(s->control & (1 << 6))) {
return 1;
}
if (!(s->status & (1 << 0))) { /* RWM */
s->status |= 1 << 7; /* s... | 0 | [
"CWE-119"
] | qemu | caa881abe0e01f9931125a0977ec33c5343e4aa7 | 305,524,572,655,741,860,000,000,000,000,000,000,000 | 17 | pxa2xx: avoid buffer overrun on incoming migration
CVE-2013-4533
s->rx_level is read from the wire and used to determine how many bytes
to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the
length of s->rx_fifo[] the buffer can be overrun with arbitrary data
from the wire.
Fix this by validating rx_leve... |
static int gfs2_xquota_set(struct super_block *sb, int type, qid_t id,
struct fs_disk_quota *fdq)
{
struct gfs2_sbd *sdp = sb->s_fs_info;
struct gfs2_inode *ip = GFS2_I(sdp->sd_quota_inode);
struct gfs2_quota_data *qd;
struct gfs2_holder q_gh, i_gh;
unsigned int data_blocks, ind_blocks;
unsigned int blocks ... | 0 | [
"CWE-399"
] | linux-2.6 | 7e619bc3e6252dc746f64ac3b486e784822e9533 | 202,589,147,331,036,400,000,000,000,000,000,000,000 | 104 | GFS2: Fix writing to non-page aligned gfs2_quota structures
This is the upstream fix for this bug. This patch differs
from the RHEL5 fix (Red Hat bz #555754) which simply writes to the 8-byte
value field of the quota. In upstream quota code, we're
required to write the entire quota (88 bytes) which can be split
across... |
static ssize_t nr_hugepages_mempolicy_show(struct kobject *kobj,
struct kobj_attribute *attr, char *buf)
{
return nr_hugepages_show_common(kobj, attr, buf);
} | 0 | [
"CWE-703"
] | linux | 5af10dfd0afc559bb4b0f7e3e8227a1578333995 | 124,282,293,240,489,570,000,000,000,000,000,000,000 | 5 | userfaultfd: hugetlbfs: remove superfluous page unlock in VM_SHARED case
huge_add_to_page_cache->add_to_page_cache implicitly unlocks the page
before returning in case of errors.
The error returned was -EEXIST by running UFFDIO_COPY on a non-hole
offset of a VM_SHARED hugetlbfs mapping. It was an userland bug that
t... |
redisContext *redisConnectWithOptions(const redisOptions *options) {
redisContext *c = redisContextInit();
if (c == NULL) {
return NULL;
}
if (!(options->options & REDIS_OPT_NONBLOCK)) {
c->flags |= REDIS_BLOCK;
}
if (options->options & REDIS_OPT_REUSEADDR) {
c->flags |= ... | 0 | [
"CWE-190",
"CWE-680"
] | redis | 0215324a66af949be39b34be2d55143232c1cb71 | 328,898,453,357,084,800,000,000,000,000,000,000,000 | 52 | Fix redis-cli / redis-sential overflow on some platforms (CVE-2021-32762) (#9587)
The redis-cli command line tool and redis-sentinel service may be vulnerable
to integer overflow when parsing specially crafted large multi-bulk network
replies. This is a result of a vulnerability in the underlying hiredis
library wh... |
ipip6_tunnel_del_prl(struct ip_tunnel *t, struct ip_tunnel_prl *a)
{
struct ip_tunnel_prl_entry *x;
struct ip_tunnel_prl_entry __rcu **p;
int err = 0;
ASSERT_RTNL();
if (a && a->addr != htonl(INADDR_ANY)) {
for (p = &t->prl;
(x = rtnl_dereference(*p)) != NULL;
p = &x->next) {
if (x->addr == a-... | 0 | [
"CWE-703",
"CWE-772",
"CWE-401"
] | linux | 07f12b26e21ab359261bf75cfcb424fdc7daeb6d | 289,769,129,304,858,700,000,000,000,000,000,000,000 | 31 | net: sit: fix memory leak in sit_init_net()
If register_netdev() is failed to register sitn->fb_tunnel_dev,
it will go to err_reg_dev and forget to free netdev(sitn->fb_tunnel_dev).
BUG: memory leak
unreferenced object 0xffff888378daad00 (size 512):
comm "syz-executor.1", pid 4006, jiffies 4295121142 (age 16.115s)
... |
juniper_mlppp_print(netdissect_options *ndo,
const struct pcap_pkthdr *h, register const u_char *p)
{
struct juniper_l2info_t l2info;
l2info.pictype = DLT_JUNIPER_MLPPP;
if (juniper_parse_header(ndo, p, h, &l2info) == 0)
return l2info.header_len;
/* supp... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 286,154,913,281,338,460,000,000,000,000,000,000,000 | 55 | CVE-2017-12897/ISO CLNS: Use ND_TTEST() for the bounds checks in isoclns_print().
This fixes a buffer over-read discovered by Kamil Frankowicz.
Don't pass the remaining caplen - that's too hard to get right, and we
were getting it wrong in at least one case; just use ND_TTEST().
Add a test using the capture file sup... |
static int __rbd_img_fill_from_bio(struct rbd_img_request *img_req,
struct ceph_file_extent *img_extents,
u32 num_img_extents,
struct ceph_bio_iter *bio_pos)
{
struct rbd_img_fill_ctx fctx = {
.pos_type = OBJ_REQUEST_BIO,
.pos = (union rbd_img_fill_iter *)bio_pos,
.set_pos_fn = set_bio_pos,
... | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 324,090,982,307,399,480,000,000,000,000,000,000,000 | 16 | rbd: require global CAP_SYS_ADMIN for mapping and unmapping
It turns out that currently we rely only on sysfs attribute
permissions:
$ ll /sys/bus/rbd/{add*,remove*}
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add
--w------- 1 root root 4096 Sep 3 20:37 /sys/bus/rbd/add_single_major
--w------- 1 ro... |
print_bacp_config_options(netdissect_options *ndo,
const u_char *p, int length)
{
int len, opt;
if (length < 2)
return 0;
ND_TCHECK2(*p, 2);
len = p[1];
opt = p[0];
if (length < len)
return 0;
if (len < 2) {
ND_PRINT((ndo, "\n\t %s Option (0x%02x), length %u (length bogus, shoul... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | 7029d15f148ef24bb7c6668bc640f5470d085e5a | 71,452,187,779,997,650,000,000,000,000,000,000,000 | 52 | CVE-2017-13029/PPP: Fix a bounds check, and clean up other bounds checks.
For configuration protocol options, use ND_TCHECK() and
ND_TCHECK_nBITS() macros, passing them the appropriate pointer argument.
This fixes one case where the ND_TCHECK2() call they replace was not
checking enough bytes.
This fixes a buffer ove... |
ntpq_custom_opt_handler(
tOptions *pOptions,
tOptDesc *pOptDesc
)
{
switch (pOptDesc->optValue) {
default:
fprintf(stderr,
"ntpq_custom_opt_handler unexpected option '%c' (%d)\n",
pOptDesc->optValue, pOptDesc->optValue);
exit(1);
case 'c':
ADDCMD(pOptDesc->pzLastArg);
break;
case 'p':
ADDCMD("... | 0 | [
"CWE-20"
] | ntp | 07a5b8141e354a998a52994c3c9cd547927e56ce | 134,964,220,967,890,060,000,000,000,000,000,000,000 | 22 | [TALOS-CAN-0063] avoid buffer overrun in ntpq |
uint8_t ucQueueGetQueueType( QueueHandle_t xQueue )
{
return ( ( Queue_t * ) xQueue )->ucQueueType;
}
| 0 | [
"CWE-200",
"CWE-190"
] | FreeRTOS-Kernel | 47338393f1f79558f6144213409f09f81d7c4837 | 215,653,063,422,279,060,000,000,000,000,000,000,000 | 4 | add assert for addition overflow on queue creation (#225) |
rfbSendKeyboardLedState(rfbClientPtr cl)
{
rfbFramebufferUpdateRectHeader rect;
if (cl->ublen + sz_rfbFramebufferUpdateRectHeader > UPDATE_BUF_SIZE) {
if (!rfbSendUpdateBuf(cl))
return FALSE;
}
rect.encoding = Swap32IfLE(rfbEncodingKeyboardLedState);
rect.r.x = Swap16IfLE(cl->l... | 0 | [] | libvncserver | 804335f9d296440bb708ca844f5d89b58b50b0c6 | 326,880,902,901,223,200,000,000,000,000,000,000,000 | 26 | Thread safety for zrle, zlib, tight.
Proposed tight security type fix for debian bug 517422. |
GF_Box *pdin_New()
{
ISOM_DECL_BOX_ALLOC(GF_ProgressiveDownloadBox, GF_ISOM_BOX_TYPE_PDIN);
tmp->flags = 1;
return (GF_Box *)tmp; | 0 | [
"CWE-400",
"CWE-401"
] | gpac | d2371b4b204f0a3c0af51ad4e9b491144dd1225c | 5,819,660,171,401,973,000,000,000,000,000,000,000 | 6 | prevent dref memleak on invalid input (#1183) |
set_binary (FILE *fp)
{
#ifdef HAVE_DOSISH_SYSTEM
setmode (fileno (fp), O_BINARY);
#else
(void)fp;
#endif
} | 0 | [] | gnupg | abd5f6752d693b7f313c19604f0723ecec4d39a6 | 84,715,650,895,854,580,000,000,000,000,000,000,000 | 8 | dirmngr,gpgsm: Return NULL on fail
* dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL.
* sm/gpgsm.c (parse_keyserver_line): Ditto.
--
Reported-by: Joshua Rogers <git@internot.info>
"If something inside the ldapserver_parse_one function failed,
'server' would be freed, then returned, leading to a
... |
static inline bool is_zone_device_page(const struct page *page)
{
return page_zonenum(page) == ZONE_DEVICE;
} | 0 | [
"CWE-119"
] | linux | 1be7107fbe18eed3e319a6c3e83c78254b693acb | 29,358,488,085,904,630,000,000,000,000,000,000,000 | 4 | 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 ... |
ipmi_sdr_print_entity(struct ipmi_intf *intf, char *entitystr)
{
struct sdr_record_list *list, *entry;
struct entity_id entity;
unsigned id = 0;
unsigned instance = 0;
int rc = 0;
if (!entitystr ||
strncasecmp(entitystr, "help", 4) == 0 ||
strncasecmp(entitystr, "list", 4) == 0) {
print_valstr_2col(e... | 0 | [
"CWE-120"
] | ipmitool | 7ccea283dd62a05a320c1921e3d8d71a87772637 | 132,587,086,229,970,020,000,000,000,000,000,000,000 | 55 | 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... |
static ssize_t f_printer_opts_pnp_string_store(struct config_item *item,
const char *page, size_t len)
{
struct f_printer_opts *opts = to_f_printer_opts(item);
char *new_pnp;
int result;
mutex_lock(&opts->lock);
new_pnp = kstrndup(page, len, GFP_KERNEL);
if (!new_pnp) {
result = -ENOMEM;
goto un... | 0 | [
"CWE-416"
] | linux | e8d5f92b8d30bb4ade76494490c3c065e12411b1 | 316,503,519,679,647,040,000,000,000,000,000,000,000 | 26 | usb: gadget: function: printer: fix use-after-free in __lock_acquire
Fix this by increase object reference count.
BUG: KASAN: use-after-free in __lock_acquire+0x3fd4/0x4180
kernel/locking/lockdep.c:3831
Read of size 8 at addr ffff8880683b0018 by task syz-executor.0/3377
CPU: 1 PID: 3377 Comm: syz-executor.0 Not tain... |
parse_extra(struct magic_set *ms, struct magic_entry *me, const char *line,
off_t off, size_t len, const char *name, const char *extra, int nt)
{
size_t i;
const char *l = line;
struct magic *m = &me->mp[me->cont_count == 0 ? 0 : me->cont_count - 1];
char *buf = (char *)m + off;
if (buf[0] != '\0') {
len = ... | 0 | [
"CWE-399"
] | file | 90018fe22ff8b74a22fcd142225b0a00f3f12677 | 245,517,573,103,020,050,000,000,000,000,000,000,000 | 45 | bump recursion to 15, and allow it to be set from the command line. |
get_ticket_handler(struct ceph_auth_client *ac, int service)
{
struct ceph_x_ticket_handler *th;
struct ceph_x_info *xi = ac->private;
struct rb_node *parent = NULL, **p = &xi->ticket_handlers.rb_node;
while (*p) {
parent = *p;
th = rb_entry(parent, struct ceph_x_ticket_handler, node);
if (service < th->serv... | 0 | [
"CWE-399",
"CWE-119"
] | linux | c27a3e4d667fdcad3db7b104f75659478e0c68d8 | 96,691,367,442,929,480,000,000,000,000,000,000,000 | 26 | libceph: do not hard code max auth ticket len
We hard code cephx auth ticket buffer size to 256 bytes. This isn't
enough for any moderate setups and, in case tickets themselves are not
encrypted, leads to buffer overflows (ceph_x_decrypt() errors out, but
ceph_decode_copy() doesn't - it's just a memcpy() wrapper). S... |
static void entersafe_reverse_buffer(u8* buff,size_t size)
{
u8 t;
u8 * end=buff+size-1;
while(buff<end)
{
t = *buff;
*buff = *end;
*end=t;
++buff;
--end;
}
} | 0 | [
"CWE-125"
] | OpenSC | 8fe377e93b4b56060e5bbfb6f3142ceaeca744fa | 23,127,060,404,738,410,000,000,000,000,000,000,000 | 14 | fixed out of bounds reads
Thanks to Eric Sesterhenn from X41 D-SEC GmbH
for reporting and suggesting security fixes. |
int RGWCopyObj_ObjStore_S3::check_storage_class(const rgw_placement_rule& src_placement)
{
if (src_placement == s->dest_placement) {
/* can only copy object into itself if replacing attrs */
s->err.message = "This copy request is illegal because it is trying to copy "
"an object to itself without changi... | 0 | [
"CWE-79"
] | ceph | fce0b267446d6f3f631bb4680ebc3527bbbea002 | 66,881,120,955,602,520,000,000,000,000,000,000,000 | 12 | rgw: reject unauthenticated response-header actions
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit d8dd5e513c0c62bbd7d3044d7e2eddcd897bd400) |
static int v2_init_io(struct quota_handle *h)
{
struct v2_disk_dqinfo ddqinfo;
h->qh_info.u.v2_mdqi.dqi_qtree.dqi_entry_size =
sizeof(struct v2r1_disk_dqblk);
h->qh_info.u.v2_mdqi.dqi_qtree.dqi_ops = &v2r1_fmt_ops;
/* Read information about quotafile */
if (h->e2fs_read(&h->qh_qf, V2_DQINFOOFF, &ddqinfo,
s... | 1 | [
"CWE-787"
] | e2fsprogs | 8dbe7b475ec5e91ed767239f0e85880f416fc384 | 311,304,250,249,122,520,000,000,000,000,000,000,000 | 15 | libsupport: add checks to prevent buffer overrun bugs in quota code
A maliciously corrupted file systems can trigger buffer overruns in
the quota code used by e2fsck. To fix this, add sanity checks to the
quota header fields as well as to block number references in the quota
tree.
Addresses: CVE-2019-5094
Addresses:... |
do_cache_op(unsigned long start, unsigned long end, int flags)
{
struct mm_struct *mm = current->active_mm;
struct vm_area_struct *vma;
if (end < start || flags)
return -EINVAL;
down_read(&mm->mmap_sem);
vma = find_vma(mm, start);
if (vma && vma->vm_start < end) {
if (start < vma->vm_start)
start = vma->... | 0 | [
"CWE-284",
"CWE-264"
] | linux | a4780adeefd042482f624f5e0d577bf9cdcbb760 | 192,394,810,917,147,500,000,000,000,000,000,000,000 | 22 | ARM: 7735/2: Preserve the user r/w register TPIDRURW on context switch and fork
Since commit 6a1c53124aa1 the user writeable TLS register was zeroed to
prevent it from being used as a covert channel between two tasks.
There are more and more applications coming to Windows RT,
Wine could support them, but mostly they ... |
static BOOL rdp_print_offscreen_bitmap_cache_capability_set(wStream* s, UINT16 length)
{
UINT32 offscreenSupportLevel;
UINT16 offscreenCacheSize;
UINT16 offscreenCacheEntries;
WLog_INFO(TAG, "OffscreenBitmapCacheCapabilitySet (length %" PRIu16 "):", length);
if (length < 12)
return FALSE;
Stream_Read_UINT32(s... | 0 | [
"CWE-119",
"CWE-125"
] | FreeRDP | 3627aaf7d289315b614a584afb388f04abfb5bbf | 52,430,610,983,265,660,000,000,000,000,000,000,000 | 18 | Fixed #6011: Bounds check in rdp_read_font_capability_set |
void print_plane_impl(std::ostream& out, const CGAL::Plane_3<R>& p) {
out << p;
} | 0 | [
"CWE-125"
] | cgal | 5a1ab45058112f8647c14c02f58905ecc597ec76 | 176,290,582,415,738,800,000,000,000,000,000,000,000 | 3 | Fix Nef_3 |
static snd_pcm_sframes_t rewind_appl_ptr(struct snd_pcm_substream *substream,
snd_pcm_uframes_t frames,
snd_pcm_sframes_t avail)
{
struct snd_pcm_runtime *runtime = substream->runtime;
snd_pcm_sframes_t appl_ptr;
int ret;
if (avail <= 0)
return 0;
if (frames > (snd_pcm_uframes_t)avail)
frames = av... | 0 | [
"CWE-125"
] | linux | 92ee3c60ec9fe64404dc035e7c41277d74aa26cb | 294,516,784,258,804,700,000,000,000,000,000,000,000 | 23 | ALSA: pcm: Fix races among concurrent hw_params and hw_free calls
Currently we have neither proper check nor protection against the
concurrent calls of PCM hw_params and hw_free ioctls, which may result
in a UAF. Since the existing PCM stream lock can't be used for
protecting the whole ioctl operations, we need a new... |
void CLASS parse_external_jpeg()
{
const char *file, *ext;
char *jname, *jfile, *jext;
#ifndef LIBRAW_LIBRARY_BUILD
FILE *save=ifp;
#else
if(!ifp->fname())
{
imgdata.process_warnings |= LIBRAW_WARN_NO_METADATA ;
return;
}
#endif
ext = strrchr (ifname, '.');
file = strrchr (... | 0 | [] | LibRaw | c4e374ea6c979a7d1d968f5082b7d0ea8cd27202 | 308,014,907,160,495,400,000,000,000,000,000,000,000 | 84 | additional data checks backported from 0.15.4 |
input_exit_apc(struct input_ctx *ictx)
{
if (ictx->flags & INPUT_DISCARD)
return;
log_debug("%s: \"%s\"", __func__, ictx->input_buf);
screen_set_title(ictx->ctx.s, ictx->input_buf);
server_status_window(ictx->wp->window);
} | 0 | [] | tmux | 2ffbd5b5f05dded1564ba32a6a00b0b417439b2f | 198,596,959,641,784,350,000,000,000,000,000,000,000 | 9 | When searching for tabs, start from screen width, fixes out-of-bounds
read found by Kuang-che Wu. |
void tls1_set_cert_validity(SSL *s)
{
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA_ENC);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_RSA_SIGN);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_DSA_SIGN);
tls1_check_chain(s, NULL, NULL, NULL, SSL_PKEY_ECC);
tls1_check_chain(s, NULL, NULL, NULL... | 0 | [
"CWE-20"
] | openssl | 4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2 | 268,589,122,108,552,460,000,000,000,000,000,000,000 | 10 | Don't change the state of the ETM flags until CCS processing
Changing the ciphersuite during a renegotiation can result in a crash
leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS
so this is TLS only.
The problem is caused by changing the flag indicating whether to use ETM
or not immediately on... |
R_API ut8 *r_bin_java_cp_get_8bytes(ut8 tag, ut32 *out_sz, const ut8 *buf, const ut64 len) {
ut8 *buffer = malloc (10);
if (!buffer) {
return NULL;
}
ut64 val = 0;
if (len < 8) {
*out_sz = 0;
free (buffer);
return NULL;
}
buffer[0] = tag;
val = r_bin_java_raw_to_long (buf, 0);
memcpy (buffer + 1, (cons... | 0 | [
"CWE-119",
"CWE-788"
] | radare2 | 6c4428f018d385fc80a33ecddcb37becea685dd5 | 327,212,448,216,181,370,000,000,000,000,000,000,000 | 17 | Improve boundary checks to fix oobread segfaults ##crash
* Reported by Cen Zhang via huntr.dev
* Reproducer: bins/fuzzed/javaoob-havoc.class |
static void delete_sdl_soap_binding_function_body(sdlSoapBindingFunctionBody body)
{
if (body.ns) {
efree(body.ns);
}
if (body.headers) {
zend_hash_destroy(body.headers);
efree(body.headers);
}
} | 0 | [
"CWE-476"
] | php-src | 3c939e3f69955d087e0bb671868f7267dfb2a502 | 115,891,236,592,824,200,000,000,000,000,000,000,000 | 10 | Fix bug #80672 - Null Dereference in SoapClient |
Field_bit_as_char::Field_bit_as_char(uchar *ptr_arg, uint32 len_arg,
uchar *null_ptr_arg, uchar null_bit_arg,
enum utype unireg_check_arg,
const char *field_name_arg)
:Field_bit(ptr_arg, len_arg, null_ptr_ar... | 0 | [
"CWE-120"
] | server | eca207c46293bc72dd8d0d5622153fab4d3fccf1 | 174,036,746,744,225,100,000,000,000,000,000,000,000 | 11 | 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... |
d_lite_s_alloc_simple(VALUE klass)
{
return d_simple_new_internal(klass,
INT2FIX(0), 0,
DEFAULT_SG,
0, 0, 0,
HAVE_JD);
} | 0 | [] | date | 3959accef8da5c128f8a8e2fd54e932a4fb253b0 | 133,731,037,329,451,330,000,000,000,000,000,000,000 | 8 | 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`... |
init_sequence(Oid relid, SeqTable *p_elm, Relation *p_rel)
{
SeqTable elm;
Relation seqrel;
bool found;
/* Find or create a hash table entry for this sequence */
if (seqhashtab == NULL)
create_seq_hashtable();
elm = (SeqTable) hash_search(seqhashtab, &relid, HASH_ENTER, &found);
/*
* Initialize the new h... | 0 | [
"CWE-94"
] | postgres | 5579726bd60a6e7afb04a3548bced348cd5ffd89 | 194,415,435,676,963,400,000,000,000,000,000,000,000 | 55 | In extensions, don't replace objects not belonging to the extension.
Previously, if an extension script did CREATE OR REPLACE and there was
an existing object not belonging to the extension, it would overwrite
the object and adopt it into the extension. This is problematic, first
because the overwrite is probably uni... |
nfs41_find_root_sec(struct nfs_server *server, struct nfs_fh *fhandle,
struct nfs_fsinfo *info)
{
int err;
struct page *page;
rpc_authflavor_t flavor = RPC_AUTH_MAXFLAVOR;
struct nfs4_secinfo_flavors *flavors;
struct nfs4_secinfo4 *secinfo;
int i;
page = alloc_page(GFP_KERNEL);
if (!page) {
err = -ENOM... | 0 | [
"CWE-787"
] | linux | b4487b93545214a9db8cbf32e86411677b0cca21 | 189,146,403,617,838,370,000,000,000,000,000,000,000 | 66 | 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... |
horAcc16(TIFF* tif, uint8* cp0, tmsize_t cc)
{
tmsize_t stride = PredictorState(tif)->stride;
uint16* wp = (uint16*) cp0;
tmsize_t wc = cc / 2;
assert((cc%(2*stride))==0);
if (wc > stride) {
wc -= stride;
do {
REPEAT4(stride, wp[stride] = (uint16)(((unsigned int)wp[stride] + (unsigned int)wp[0]) & 0xffff)... | 1 | [
"CWE-119",
"CWE-787"
] | libtiff | 3ca657a8793dd011bf869695d72ad31c779c3cc1 | 143,471,186,942,718,850,000,000,000,000,000,000,000 | 16 | * libtiff/tif_predict.h, libtiff/tif_predict.c:
Replace assertions by runtime checks to avoid assertions in debug mode,
or buffer overflows in release mode. Can happen when dealing with
unusual tile size like YCbCr with subsampling. Reported as MSVR 35105
by Axel Souchet & Vishal Chauhan from the MSRC Vulnerabilities &... |
nfsd4_getdeviceinfo(struct svc_rqst *rqstp,
struct nfsd4_compound_state *cstate, union nfsd4_op_u *u)
{
struct nfsd4_getdeviceinfo *gdp = &u->getdeviceinfo;
const struct nfsd4_layout_ops *ops;
struct nfsd4_deviceid_map *map;
struct svc_export *exp;
__be32 nfserr;
dprintk("%s: layout_type %u dev_id [0x%llx:0x%x... | 0 | [
"CWE-476"
] | linux | 01310bb7c9c98752cc763b36532fab028e0f8f81 | 38,330,209,076,919,730,000,000,000,000,000,000,000 | 44 | nfsd: COPY and CLONE operations require the saved filehandle to be set
Make sure we have a saved filehandle, otherwise we'll oops with a null
pointer dereference in nfs4_preprocess_stateid_op().
Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: J. Bruce Fields <bfields@redhat.... |
static bool __unpin_devmap_managed_user_page(struct page *page)
{
return false;
} | 0 | [
"CWE-362"
] | linux | 17839856fd588f4ab6b789f482ed3ffd7c403e1f | 293,336,676,910,482,700,000,000,000,000,000,000,000 | 4 | gup: document and work around "COW can break either way" issue
Doing a "get_user_pages()" on a copy-on-write page for reading can be
ambiguous: the page can be COW'ed at any time afterwards, and the
direction of a COW event isn't defined.
Yes, whoever writes to it will generally do the COW, but if the thread
that did... |
void shmem_truncate_range(struct inode *inode, loff_t lstart, loff_t lend)
{
truncate_inode_pages_range(inode->i_mapping, lstart, lend);
} | 0 | [
"CWE-399"
] | linux | 5f00110f7273f9ff04ac69a5f85bb535a4fd0987 | 147,896,382,618,804,630,000,000,000,000,000,000,000 | 4 | 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... |
njs_value_is_undefined(const njs_value_t *value)
{
return njs_is_undefined(value);
} | 0 | [] | njs | 6549d49630ce5f5ac823fd3ae0c6c8558b8716ae | 256,560,746,676,792,080,000,000,000,000,000,000,000 | 4 | Fixed redefinition of special props in Object.defineProperty().
Previously, when NJS_PROPERTY_HANDLER property was updated it might be
left in inconsistent state. Namely, prop->type was left unchanged, but
prop->value did not have an expected property handler. As a result
consecutive reference to the property may re... |
DLLIMPORT cfg_bool_t cfg_getbool(cfg_t *cfg, const char *name)
{
return cfg_getnbool(cfg, name, 0);
} | 0 | [] | libconfuse | d73777c2c3566fb2647727bb56d9a2295b81669b | 289,370,560,817,146,800,000,000,000,000,000,000,000 | 4 | Fix #163: unterminated username used with getpwnam()
Signed-off-by: Joachim Wiberg <troglobit@gmail.com> |
CImg<Tfloat> get_RGBtosRGB() const {
return CImg<Tfloat>(*this,false).RGBtosRGB();
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 264,918,873,680,175,220,000,000,000,000,000,000,000 | 3 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
bool btd_adapter_get_powered(struct btd_adapter *adapter)
{
if ((adapter->current_settings & MGMT_SETTING_POWERED) &&
!(adapter->pending_settings & MGMT_SETTING_POWERED))
return true;
return false;
} | 0 | [
"CWE-862",
"CWE-863"
] | bluez | b497b5942a8beb8f89ca1c359c54ad67ec843055 | 254,502,547,008,636,100,000,000,000,000,000,000,000 | 8 | adapter: Fix storing discoverable setting
discoverable setting shall only be store when changed via Discoverable
property and not when discovery client set it as that be considered
temporary just for the lifetime of the discovery. |
void CConnectionTransportUDP::TransportFreeResources()
{
CConnectionTransport::TransportFreeResources();
if ( m_pSocket )
{
m_pSocket->Close();
m_pSocket = nullptr;
}
} | 0 | [
"CWE-703"
] | GameNetworkingSockets | d944a10808891d202bb1d5e1998de6e0423af678 | 292,267,348,303,710,160,000,000,000,000,000,000,000 | 10 | Tweak pointer math to avoid possible integer overflow |
void smb2cli_tcon_set_values(struct smbXcli_tcon *tcon,
struct smbXcli_session *session,
uint32_t tcon_id,
uint8_t type,
uint32_t flags,
uint32_t capabilities,
uint32_t maximal_access)
{
tcon->is_smb1 = false;
tcon->fs_attributes = 0;
tcon->smb2.tcon_id = tcon_id;
tco... | 0 | [
"CWE-20"
] | samba | a819d2b440aafa3138d95ff6e8b824da885a70e9 | 11,688,849,002,218,026,000,000,000,000,000,000,000 | 30 | CVE-2015-5296: libcli/smb: make sure we require signing when we demand encryption on a session
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11536
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org> |
psf_fread (void *ptr, sf_count_t bytes, sf_count_t items, SF_PRIVATE *psf)
{ sf_count_t total = 0 ;
ssize_t count ;
DWORD dwNumberOfBytesRead ;
if (psf->virtual_io)
return psf->vio.read (ptr, bytes*items, psf->vio_user_data) / bytes ;
items *= bytes ;
/* Do this check after the multiplication above. */
if (i... | 0 | [
"CWE-369",
"CWE-189"
] | libsndfile | 725c7dbb95bfaf8b4bb7b04820e3a00cceea9ce6 | 200,098,206,516,764,300,000,000,000,000,000,000,000 | 37 | src/file_io.c : Prevent potential divide-by-zero.
Closes: https://github.com/erikd/libsndfile/issues/92 |
static ssize_t cdc_ncm_store_min_tx_pkt(struct device *d, struct device_attribute *attr, const char *buf, size_t len)
{
struct usbnet *dev = netdev_priv(to_net_dev(d));
struct cdc_ncm_ctx *ctx = (struct cdc_ncm_ctx *)dev->data[0];
unsigned long val;
/* no need to restrict values - anything from 0 to infinity is O... | 0 | [
"CWE-703"
] | linux | 4d06dd537f95683aba3651098ae288b7cbff8274 | 94,210,635,696,638,960,000,000,000,000,000,000,000 | 13 | cdc_ncm: do not call usbnet_link_change from cdc_ncm_bind
usbnet_link_change will call schedule_work and should be
avoided if bind is failing. Otherwise we will end up with
scheduled work referring to a netdev which has gone away.
Instead of making the call conditional, we can just defer
it to usbnet_probe, using the... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.