func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
static int get_name(int counter,
unsigned char *pkt, unsigned char *start, unsigned char *max,
unsigned char *output, int output_max, int *output_len,
unsigned char **end, char *name, int *name_len)
{
unsigned char *p;
/* Limit recursion to 10 (this means up to 10 labels in domain name) */
if (counter > 10)
... | 1 | [
"CWE-119"
] | connman | 5c281d182ecdd0a424b64f7698f32467f8f67b71 | 328,697,623,655,465,220,000,000,000,000,000,000,000 | 59 | dnsproxy: Fix crash on malformed DNS response
If the response query string is malformed, we might access memory
pass the end of "name" variable in parse_response(). |
static int selinux_mount(char *dev_name,
struct path *path,
char *type,
unsigned long flags,
void *data)
{
const struct cred *cred = current_cred();
if (flags & MS_REMOUNT)
return superblock_has_perm(cred, path->dentry->d_sb,
FILESYSTEM__REMOUNT, NULL);
else
return path_has_perm(cred, pa... | 0 | [
"CWE-264"
] | linux | 259e5e6c75a910f3b5e656151dc602f53f9d7548 | 149,001,194,426,321,460,000,000,000,000,000,000,000 | 14 | Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs
With this change, calling
prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0)
disables privilege granting operations at execve-time. For example, a
process will not be able to execute a setuid binary to change their uid
or gid if this bit is set. The same is t... |
static Variant HHVM_METHOD(ZipArchive, statIndex, int64_t index,
int64_t flags) {
auto zipDir = getResource<ZipDirectory>(this_, "zipDir");
FAIL_IF_INVALID_ZIPARCHIVE(statIndex, zipDir);
FAIL_IF_INVALID_INDEX(index);
struct zip_stat zipStat;
if (zip_stat_index(zipDir->getZip(), in... | 0 | [
"CWE-22"
] | hhvm | 65c95a01541dd2fbc9c978ac53bed235b5376686 | 278,429,444,384,276,550,000,000,000,000,000,000,000 | 14 | ZipArchive::extractTo bug 70350
Summary:Don't allow upward directory traversal when extracting zip archive files.
Files in zip files with `..` or starting at main root `/` should be normalized
to something where the file being extracted winds up within the directory or
a subdirectory where the actual extraction is ta... |
convertLine0(URLFile *uf, Str line, int mode)
#endif
{
#ifdef USE_M17N
line = wc_Str_conv_with_detect(line, charset, doc_charset, InnerCharset);
#endif
if (mode != RAW_MODE)
cleanup_line(line, mode);
#ifdef USE_NNTP
if (uf && uf->scheme == SCM_NEWS)
Strchop(line);
#endif /* USE_NNTP */
return line;... | 0 | [
"CWE-476"
] | w3m | 59b91cd8e30c86f23476fa81ae005cabff49ebb6 | 109,739,458,145,016,430,000,000,000,000,000,000,000 | 14 | Prevent segfault with malformed input type
Bug-Debian: https://github.com/tats/w3m/issues/7 |
static int sanitize_ptr_alu(struct bpf_verifier_env *env,
struct bpf_insn *insn,
const struct bpf_reg_state *ptr_reg,
struct bpf_reg_state *dst_reg,
bool off_is_neg)
{
struct bpf_verifier_state *vstate = env->cur_state;
struct bpf_insn_aux_data *aux = cur_aux(env);
bool ptr_is_dst_reg = p... | 1 | [
"CWE-703",
"CWE-189"
] | linux | d3bd7413e0ca40b60cf60d4003246d067cafdeda | 288,273,207,219,372,140,000,000,000,000,000,000,000 | 62 | bpf: fix sanitation of alu op with pointer / scalar type from different paths
While 979d63d50c0c ("bpf: prevent out of bounds speculation on pointer
arithmetic") took care of rejecting alu op on pointer when e.g. pointer
came from two different map values with different map properties such as
value size, Jann reported... |
inline void Add(const int16* input1_data, const Dims<4>& input1_dims,
int input1_shift, const int16* input2_data,
const Dims<4>& input2_dims, int input2_shift,
int16 output_activation_min, int16 output_activation_max,
int16* output_data, const Dims<4>& out... | 0 | [
"CWE-703",
"CWE-835"
] | tensorflow | dfa22b348b70bb89d6d6ec0ff53973bacb4f4695 | 241,996,905,226,932,300,000,000,000,000,000,000,000 | 26 | Prevent a division by 0 in average ops.
PiperOrigin-RevId: 385184660
Change-Id: I7affd4554f9b336fca29ac68f633232c094d0bd3 |
Value ExpressionArrayElemAt::evaluate(const Document& root, Variables* variables) const {
const Value array = _children[0]->evaluate(root, variables);
const Value indexArg = _children[1]->evaluate(root, variables);
if (array.nullish() || indexArg.nullish()) {
return Value(BSONNULL);
}
uass... | 0 | [
"CWE-190"
] | mongo | 21d8699ed6c517b45e1613e20231cd8eba894985 | 241,926,467,072,447,300,000,000,000,000,000,000,000 | 32 | SERVER-43699 $mod should not overflow for large negative values |
std::shared_ptr<Wasm> createThreadLocalWasm(Wasm& base_wasm, absl::string_view configuration,
Event::Dispatcher& dispatcher) {
auto wasm = std::make_shared<Wasm>(base_wasm, dispatcher);
Context* root_context = wasm->start();
if (!wasm->configure(root_context, configurat... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 118,357,793,806,775,820,000,000,000,000,000,000,000 | 12 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
static bool __tpacket_v3_has_room(const struct packet_sock *po, int pow_off)
{
int idx, len;
len = READ_ONCE(po->rx_ring.prb_bdqc.knum_blocks);
idx = READ_ONCE(po->rx_ring.prb_bdqc.kactive_blk_num);
if (pow_off)
idx += len >> pow_off;
if (idx >= len)
idx -= len;
return prb_lookup_block(po, &po->rx_ring, idx,... | 0 | [
"CWE-787"
] | linux | acf69c946233259ab4d64f8869d4037a198c7f06 | 121,783,371,596,997,500,000,000,000,000,000,000,000 | 12 | net/packet: fix overflow in tpacket_rcv
Using tp_reserve to calculate netoff can overflow as
tp_reserve is unsigned int and netoff is unsigned short.
This may lead to macoff receving a smaller value then
sizeof(struct virtio_net_hdr), and if po->has_vnet_hdr
is set, an out-of-bounds write will occur when
calling virt... |
static void tun_free_netdev(struct net_device *dev)
{
struct tun_struct *tun = netdev_priv(dev);
sock_put(tun->socket.sk);
} | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 185,041,710,786,269,880,000,000,000,000,000,000,000 | 6 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
glue(cirrus_bitblt_rop_bkwd_, ROP_NAME)(CirrusVGAState *s,
uint8_t *dst,const uint8_t *src,
int dstpitch,int srcpitch,
int bltwidth,int bltheight)
{
int x,y;
dstpitch += bltwidth;
srcpitch... | 1 | [
"CWE-119"
] | qemu | 026aeffcb4752054830ba203020ed6eb05bcaba8 | 207,417,383,681,231,730,000,000,000,000,000,000,000 | 18 | cirrus: stop passing around dst pointers in the blitter
Instead pass around the address (aka offset into vga memory). Calculate
the pointer in the rop_* functions, after applying the mask to the
address, to make sure the address stays within the valid range.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-i... |
PyBytes_Concat(PyObject **pv, PyObject *w)
{
assert(pv != NULL);
if (*pv == NULL)
return;
if (w == NULL) {
Py_CLEAR(*pv);
return;
}
if (Py_REFCNT(*pv) == 1 && PyBytes_CheckExact(*pv)) {
/* Only one reference, so we can resize in place */
Py_ssize_t oldsize;
... | 0 | [
"CWE-190"
] | cpython | fd8614c5c5466a14a945db5b059c10c0fb8f76d9 | 278,064,338,684,463,230,000,000,000,000,000,000,000 | 48 | bpo-30657: Fix CVE-2017-1000158 (#4664)
Fixes possible integer overflow in PyBytes_DecodeEscape.
Co-Authored-By: Jay Bosamiya <jaybosamiya@gmail.com> |
void CLASS parse_makernote_0xc634(int base, int uptag, unsigned dng_writer)
{
if (imgdata.params.raw_processing_options & LIBRAW_PROCESSING_SKIP_MAKERNOTES)
return;
if (!strncmp(make, "NIKON", 5)) {
parseNikonMakernote (base, uptag, AdobeDNG);
return;
} else if (!strncasecmp(make, "LEICA", 5)) {
... | 0 | [
"CWE-400"
] | LibRaw | e67a9862d10ebaa97712f532eca1eb5e2e410a22 | 252,094,945,389,751,930,000,000,000,000,000,000,000 | 237 | Fixed Secunia Advisory SA86384
- possible infinite loop in unpacked_load_raw()
- possible infinite loop in parse_rollei()
- possible infinite loop in parse_sinar_ia()
Credits: Laurent Delosieres, Secunia Research at Flexera |
register_display (GdmDisplay *self)
{
GdmDisplayPrivate *priv;
GError *error = NULL;
priv = gdm_display_get_instance_private (self);
error = NULL;
priv->connection = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, &error);
if (priv->connection == NULL) {
g_crit... | 0 | [
"CWE-754"
] | gdm | 4e6e5335d29c039bed820c43bfd1c19cb62539ff | 54,199,587,785,688,940,000,000,000,000,000,000,000 | 36 | display: Use autoptr to handle errors in look for existing users
It will make things just cleaner |
static ssize_t __io_iov_buffer_select(struct io_kiocb *req, struct iovec *iov,
unsigned int issue_flags)
{
struct iovec __user *uiov = u64_to_user_ptr(req->rw.addr);
void __user *buf;
ssize_t len;
if (copy_from_user(iov, uiov, sizeof(*uiov)))
return -EFAULT;
len = iov[0].iov_len;
if (len < 0)
retu... | 0 | [
"CWE-416"
] | linux | 9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7 | 111,775,888,589,500,820,000,000,000,000,000,000,000 | 21 | 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... |
xmlRegPrintRange(FILE *output, xmlRegRangePtr range) {
fprintf(output, " range: ");
if (range->neg)
fprintf(output, "negative ");
xmlRegPrintAtomType(output, range->type);
fprintf(output, "%c - %c\n", range->start, range->end);
} | 0 | [
"CWE-119"
] | libxml2 | cbb271655cadeb8dbb258a64701d9a3a0c4835b4 | 157,370,724,926,879,720,000,000,000,000,000,000,000 | 7 | Bug 757711: heap-buffer-overflow in xmlFAParsePosCharGroup <https://bugzilla.gnome.org/show_bug.cgi?id=757711>
* xmlregexp.c:
(xmlFAParseCharRange): Only advance to the next character if
there is no error. Advancing to the next character in case of
an error while parsing regexp leads to an out of bounds access. |
static int read_data(void *opaque, uint8_t *buf, int buf_size)
{
struct playlist *v = opaque;
HLSContext *c = v->parent->priv_data;
int ret, i;
int just_opened = 0;
int reload_count = 0;
restart:
if (!v->needed)
return AVERROR_EOF;
if (!v->input) {
int64_t reload_interval;
... | 0 | [
"CWE-703"
] | FFmpeg | 7ba100d3e6e8b1e5d5342feb960a7f081d6e15af | 201,214,342,314,507,460,000,000,000,000,000,000,000 | 97 | avformat/hls: Fix DoS due to infinite loop
Fixes: loop.m3u
The default max iteration count of 1000 is arbitrary and ideas for a better solution are welcome
Found-by: Xiaohei and Wangchu from Alibaba Security Team
Previous version reviewed-by: Steven Liu <lingjiujianke@gmail.com>
Signed-off-by: Michael Niedermayer <... |
bgp_attr_community (struct peer *peer, bgp_size_t length,
struct attr *attr, u_char flag, u_char *startp)
{
bgp_size_t total
= length + (CHECK_FLAG (flag, BGP_ATTR_FLAG_EXTLEN) ? 4 : 3);
if (length == 0)
{
attr->community = NULL;
return BGP_ATTR_PARSE_PROCEED;
}
/* Flags check... | 1 | [] | quagga | 835315bfb49bff2b2fb354f2075c6d6693c2a151 | 198,920,334,880,546,150,000,000,000,000,000,000,000 | 33 | bgpd: Move up flag-check calls, parcel up attr-parser args, and other cleanups
* bgp_attr.h: (struct bgp_attr_parser_args) Attribute parsing context,
containing common arguments.
* bgp_attr.c: (general) Move the bgp_attr_flag_invalid flag-check calls up,
out of each individual attr parser function, to be done once... |
static void cancel_tasks_sync(struct rbd_device *rbd_dev)
{
dout("%s rbd_dev %p\n", __func__, rbd_dev);
cancel_work_sync(&rbd_dev->acquired_lock_work);
cancel_work_sync(&rbd_dev->released_lock_work);
cancel_delayed_work_sync(&rbd_dev->lock_dwork);
cancel_work_sync(&rbd_dev->unlock_work);
} | 0 | [
"CWE-863"
] | linux | f44d04e696feaf13d192d942c4f14ad2e117065a | 60,278,805,806,854,350,000,000,000,000,000,000,000 | 9 | 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... |
const CImg<T>& texturize_object3d(CImgList<tp>& primitives, CImgList<tc>& colors,
const CImg<tt>& texture, const CImg<tx>& coords=CImg<tx>::const_empty()) const {
if (is_empty()) return *this;
if (_height!=3)
throw CImgInstanceException(_cimg_instance
... | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 304,024,569,653,941,300,000,000,000,000,000,000,000 | 72 | CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size. |
static char *cgroup_file_name(struct cgroup *cgrp, const struct cftype *cft,
char *buf)
{
struct cgroup_subsys *ss = cft->ss;
if (cft->ss && !(cft->flags & CFTYPE_NO_PREFIX) &&
!(cgrp->root->flags & CGRP_ROOT_NOPREFIX)) {
const char *dbg = (cft->flags & CFTYPE_DEBUG) ? ".__DEBUG__." : "";
snprintf... | 0 | [
"CWE-416"
] | linux | a06247c6804f1a7c86a2e5398a4c1f1db1471848 | 88,386,212,052,253,780,000,000,000,000,000,000,000 | 17 | psi: Fix uaf issue when psi trigger is destroyed while being polled
With write operation on psi files replacing old trigger with a new one,
the lifetime of its waitqueue is totally arbitrary. Overwriting an
existing trigger causes its waitqueue to be freed and pending poll()
will stumble on trigger->event_wait which w... |
asn1_decode_simple_ber (unsigned int etype, const unsigned char *der,
unsigned int _der_len, unsigned char **str,
unsigned int *str_len, unsigned int *ber_len)
{
int tag_len, len_len;
const unsigned char *p;
int der_len = _der_len;
uint8_t *total = NULL;
unsigned total_size = 0;
unsigned char class;
... | 0 | [
"CWE-119"
] | libtasn1 | f979435823a02f842c41d49cd41cc81f25b5d677 | 296,916,969,199,181,400,000,000,000,000,000,000,000 | 149 | _asn1_extract_der_octet: prevent past of boundary access
Reported by Hanno Böck. |
static int ipip6_rcv(struct sk_buff *skb)
{
const struct iphdr *iph = ip_hdr(skb);
struct ip_tunnel *tunnel;
int sifindex;
int err;
sifindex = netif_is_l3_master(skb->dev) ? IPCB(skb)->iif : 0;
tunnel = ipip6_tunnel_lookup(dev_net(skb->dev), skb->dev,
iph->saddr, iph->daddr, sifindex);
if (tunnel) {
... | 0 | [
"CWE-703",
"CWE-772",
"CWE-401"
] | linux | 07f12b26e21ab359261bf75cfcb424fdc7daeb6d | 144,910,125,885,522,920,000,000,000,000,000,000,000 | 60 | 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)
... |
static int ptrace_setoptions(struct task_struct *child, unsigned long data)
{
unsigned flags;
if (data & ~(unsigned long)PTRACE_O_MASK)
return -EINVAL;
/* Avoid intermediate state when all opts are cleared */
flags = child->ptrace;
flags &= ~(PTRACE_O_MASK << PT_OPT_FLAG_SHIFT);
flags |= (data << PT_OPT_FLAG_... | 0 | [
"CWE-284",
"CWE-264"
] | linux | d049f74f2dbe71354d43d393ac3a188947811348 | 338,768,338,833,995,730,000,000,000,000,000,000,000 | 15 | exec/ptrace: fix get_dumpable() incorrect tests
The get_dumpable() return value is not boolean. Most users of the
function actually want to be testing for non-SUID_DUMP_USER(1) rather than
SUID_DUMP_DISABLE(0). The SUID_DUMP_ROOT(2) is also considered a
protected state. Almost all places did this correctly, excepti... |
void rtl8xxxu_gen1_init_phy_bb(struct rtl8xxxu_priv *priv)
{
u8 val8, ldoa15, ldov12d, lpldo, ldohci12;
u16 val16;
u32 val32;
val8 = rtl8xxxu_read8(priv, REG_AFE_PLL_CTRL);
udelay(2);
val8 |= AFE_PLL_320_ENABLE;
rtl8xxxu_write8(priv, REG_AFE_PLL_CTRL, val8);
udelay(2);
rtl8xxxu_write8(priv, REG_AFE_PLL_CTRL ... | 0 | [
"CWE-400",
"CWE-401"
] | linux | a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c | 234,257,442,538,072,800,000,000,000,000,000,000,000 | 52 | rtl8xxxu: prevent leaking urb
In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb
should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Reviewed-by: Chris Chiu <chiu@endlessm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org> |
static int cgroup_write_notify_on_release(struct cgroup_subsys_state *css,
struct cftype *cft, u64 val)
{
if (val)
set_bit(CGRP_NOTIFY_ON_RELEASE, &css->cgroup->flags);
else
clear_bit(CGRP_NOTIFY_ON_RELEASE, &css->cgroup->flags);
return 0;
} | 0 | [
"CWE-416"
] | linux | 3b0462726e7ef281c35a7a4ae33e93ee2bc9975b | 245,263,574,800,958,060,000,000,000,000,000,000,000 | 9 | cgroup: verify that source is a string
The following sequence can be used to trigger a UAF:
int fscontext_fd = fsopen("cgroup");
int fd_null = open("/dev/null, O_RDONLY);
int fsconfig(fscontext_fd, FSCONFIG_SET_FD, "source", fd_null);
close_range(3, ~0U, 0);
The cgroup v1 specific fs parser expects a... |
static int snd_pcm_oss_unregister_minor(struct snd_pcm *pcm)
{
snd_pcm_oss_disconnect_minor(pcm);
snd_pcm_oss_proc_done(pcm);
return 0;
} | 0 | [
"CWE-362"
] | linux | 8423f0b6d513b259fdab9c9bf4aaa6188d054c2d | 321,232,033,937,749,900,000,000,000,000,000,000,000 | 6 | ALSA: pcm: oss: Fix race at SNDCTL_DSP_SYNC
There is a small race window at snd_pcm_oss_sync() that is called from
OSS PCM SNDCTL_DSP_SYNC ioctl; namely the function calls
snd_pcm_oss_make_ready() at first, then takes the params_lock mutex
for the rest. When the stream is set up again by another thread
between them, ... |
void lposCommand(client *c) {
robj *o, *ele;
ele = c->argv[2];
int direction = LIST_TAIL;
long rank = 1, count = -1, maxlen = 0; /* Count -1: option not given. */
/* Parse the optional arguments. */
for (int j = 3; j < c->argc; j++) {
char *opt = c->argv[j]->ptr;
int moreargs = ... | 1 | [
"CWE-190"
] | redis | f6a40570fa63d5afdd596c78083d754081d80ae3 | 25,673,424,022,417,700,000,000,000,000,000,000,000 | 99 | Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628)
- fix possible heap corruption in ziplist and listpack resulting by trying to
allocate more than the maximum size of 4GB.
- prevent ziplist (hash and zset) from reaching size of above 1GB, will be
converted to HT encoding, that's n... |
nv_percent(cmdarg_T *cap)
{
pos_T *pos;
#if defined(FEAT_FOLDING)
linenr_T lnum = curwin->w_cursor.lnum;
#endif
cap->oap->inclusive = TRUE;
if (cap->count0) // {cnt}% : goto {cnt} percentage in file
{
if (cap->count0 > 100)
clearopbeep(cap->oap);
else
{
cap->oap->motion_type = MLIN... | 0 | [
"CWE-416"
] | vim | 35a9a00afcb20897d462a766793ff45534810dc3 | 291,181,537,292,393,000,000,000,000,000,000,000,000 | 56 | patch 8.2.3428: using freed memory when replacing
Problem: Using freed memory when replacing. (Dhiraj Mishra)
Solution: Get the line pointer after calling ins_copychar(). |
static cache_accel_t *read_cache_accel(RzBuffer *cache_buf, cache_hdr_t *hdr, cache_map_t *maps) {
if (!cache_buf || !hdr || !hdr->accelerateInfoSize || !hdr->accelerateInfoAddr) {
return NULL;
}
ut64 offset = va2pa(hdr->accelerateInfoAddr, hdr->mappingCount, maps, cache_buf, 0, NULL, NULL);
if (!offset) {
ret... | 0 | [
"CWE-787"
] | rizin | 556ca2f9eef01ec0f4a76d1fbacfcf3a87a44810 | 42,696,270,539,523,570,000,000,000,000,000,000,000 | 32 | Fix oob write in dyldcache
When the individual n_slide_infos were too high, the sum would overflow
and too few entries would be allocated. |
static void test_progress_reporting()
{
int rc, i;
MYSQL* conn;
/* Progress reporting doesn't work yet with embedded server */
if (embedded_server_arg_count)
return;
myheader("test_progress_reporting");
conn= client_connect(CLIENT_PROGRESS, MYSQL_PROTOCOL_TCP, 0);
DIE_UNLESS(conn->client_flag... | 0 | [
"CWE-416"
] | server | eef21014898d61e77890359d6546d4985d829ef6 | 312,297,228,975,643,800,000,000,000,000,000,000,000 | 46 | MDEV-11933 Wrong usage of linked list in mysql_prune_stmt_list
mysql_prune_stmt_list() was walking the list following
element->next pointers, but inside the loop it was invoking
list_add(element) that modified element->next. So, mysql_prune_stmt_list()
failed to visit and reset all elements, and some of them were left... |
guid_to_str(wmem_allocator_t *scope, const e_guid_t *guid)
{
gchar *buf;
buf=(gchar *)wmem_alloc(scope, GUID_STR_LEN);
return guid_to_str_buf(guid, buf, GUID_STR_LEN);
} | 0 | [
"CWE-125"
] | wireshark | d5f2657825e63e4126ebd7d13a59f3c6e8a9e4e1 | 46,153,475,737,751,730,000,000,000,000,000,000,000 | 7 | epan: Limit our bits in decode_bits_in_field.
Limit the number of bits we process in decode_bits_in_field, otherwise
we'll overrun our buffer. Fixes #16958. |
if (runModConf->docroot.val) {
*pcivetweb_options = runModConf->docroot.name;
pcivetweb_options++;
*pcivetweb_options = runModConf->docroot.val;
pcivetweb_options++;
} | 0 | [
"CWE-787"
] | rsyslog | 89955b0bcb1ff105e1374aad7e0e993faa6a038f | 190,935,833,554,900,650,000,000,000,000,000,000,000 | 6 | net bugfix: potential buffer overrun |
static void __free_filter(struct event_filter *filter)
{
if (!filter)
return;
free_prog(filter);
kfree(filter->filter_string);
kfree(filter);
} | 0 | [
"CWE-787"
] | linux | 70303420b5721c38998cf987e6b7d30cc62d4ff1 | 76,230,911,195,455,720,000,000,000,000,000,000,000 | 9 | tracing: Check for no filter when processing event filters
The syzkaller detected a out-of-bounds issue with the events filter code,
specifically here:
prog[N].pred = NULL; /* #13 */
prog[N].target = 1; /* TRUE */
prog[N+1].pred = NULL;
prog[N+1].target = 0; /* FALSE */
-> prog[N-1].target = N;
prog[N-1].w... |
DEFUN (clear_bgp_peer_group_in_prefix_filter,
clear_bgp_peer_group_in_prefix_filter_cmd,
"clear bgp peer-group WORD in prefix-filter",
CLEAR_STR
BGP_STR
"Clear all members of peer-group\n"
"BGP peer-group name\n"
"Soft reconfig inbound update\n"
"Push out prefix-l... | 0 | [
"CWE-125"
] | frr | 6d58272b4cf96f0daa846210dd2104877900f921 | 132,283,388,223,014,940,000,000,000,000,000,000,000 | 13 | [bgpd] cleanup, compact and consolidate capability parsing code
2007-07-26 Paul Jakma <paul.jakma@sun.com>
* (general) Clean up and compact capability parsing slightly.
Consolidate validation of length and logging of generic TLV, and
memcpy of capability data, thus removing such from cap specifc
code (not a... |
static void i40e_vsi_configure_msix(struct i40e_vsi *vsi)
{
bool has_xdp = i40e_enabled_xdp_vsi(vsi);
struct i40e_pf *pf = vsi->back;
struct i40e_hw *hw = &pf->hw;
u16 vector;
int i, q;
u32 qp;
/* The interrupt indexing is offset by 1 in the PFINT_ITRn
* and PFINT_LNKLSTn registers, e.g.:
* PFINT_ITRn[0..... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 27d461333459d282ffa4a2bdb6b215a59d493a8f | 332,761,975,153,469,300,000,000,000,000,000,000,000 | 80 | i40e: prevent memory leak in i40e_setup_macvlans
In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory
for ch should be released.
Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> |
static ut32 getimmed8(const char *str) {
ut32 num = getnum (str);
if (err) {
return 0;
}
ut32 rotate;
if (num <= 0xff) {
return num;
} else {
for (rotate = 1; rotate < 16; rotate++) {
// rol 2
num = ((num << 2) | (num >> 30));
if (num == (num & 0xff)) {
return (num | (rotate << 8));
}
}
... | 0 | [
"CWE-125",
"CWE-787"
] | radare2 | e5c14c167b0dcf0a53d76bd50bacbbcc0dfc1ae7 | 17,846,998,464,056,735,000,000,000,000,000,000,000 | 20 | Fix #12417/#12418 (arm assembler heap overflows) |
static int xen_pcibk_read_device(struct pci_dev *dev, int offset,
u16 *value, void *data)
{
*value = dev->device;
return 0;
} | 0 | [
"CWE-284",
"CWE-264"
] | linux | af6fc858a35b90e89ea7a7ee58e66628c55c776b | 313,348,152,705,782,900,000,000,000,000,000,000,000 | 7 | xen-pciback: limit guest control of command register
Otherwise the guest can abuse that control to cause e.g. PCIe
Unsupported Request responses by disabling memory and/or I/O decoding
and subsequently causing (CPU side) accesses to the respective address
ranges, which (depending on system configuration) may be fatal ... |
static void bond_ab_arp_commit(struct bonding *bond, int delta_in_ticks)
{
struct slave *slave;
int i;
unsigned long trans_start;
bond_for_each_slave(bond, slave, i) {
switch (slave->new_link) {
case BOND_LINK_NOCHANGE:
continue;
case BOND_LINK_UP:
trans_start = dev_trans_start(slave->dev);
if ((!b... | 0 | [
"CWE-703",
"CWE-264"
] | linux | 550fd08c2cebad61c548def135f67aba284c6162 | 99,455,449,897,744,200,000,000,000,000,000,000,000 | 67 | net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
After the last patch, We are left in a state in which only drivers calling
ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
hardware call ether_setup for their net_devices and don't hold any state in
their skbs. There... |
void CClient::AcceptLogin(CUser& User) {
m_sPass = "";
m_pUser = &User;
// Set our proper timeout and set back our proper timeout mode
// (constructor set a different timeout and mode)
SetTimeout(User.GetNoTrafficTimeout(), TMO_READ);
SetSockName("USR::" + m_pUser->GetUsername());
SetEncod... | 0 | [
"CWE-476"
] | znc | 2390ad111bde16a78c98ac44572090b33c3bd2d8 | 144,528,265,901,974,800,000,000,000,000,000,000,000 | 50 | 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 PHP_GINIT_FUNCTION(spl)
{
spl_globals->autoload_extensions = NULL;
spl_globals->autoload_extensions_len = 0;
spl_globals->autoload_functions = NULL;
spl_globals->autoload_running = 0;
} | 0 | [] | php-src | b584b513983319be170f02828bc7c12850b40320 | 228,868,599,623,327,100,000,000,000,000,000,000,000 | 7 | Fixed bug #70290 (Null pointer deref (segfault) in spl_autoload via ob_start) |
static MagickBooleanType WriteGIFImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
int
c;
ImageInfo
*write_info;
MagickBooleanType
status;
MagickOffsetType
scene;
RectangleInfo
page;
register ssize_t
i;
register unsigned char
*q;
size_t
... | 0 | [
"CWE-772"
] | ImageMagick | 24d5699753170c141b46816284430516c2d48fed | 137,795,938,956,737,100,000,000,000,000,000,000,000 | 441 | https://github.com/ImageMagick/ImageMagick/issues/808 |
int mp_iszero(mp_int* a)
{
return fp_iszero(a);
} | 0 | [
"CWE-326",
"CWE-203"
] | wolfssl | 1de07da61f0c8e9926dcbd68119f73230dae283f | 286,945,219,708,267,680,000,000,000,000,000,000,000 | 4 | Constant time EC map to affine for private operations
For fast math, use a constant time modular inverse when mapping to
affine when operation involves a private key - key gen, calc shared
secret, sign. |
void inet_frags_exit_net(struct netns_frags *nf, struct inet_frags *f)
{
nf->low_thresh = 0;
local_bh_disable();
inet_frag_evictor(nf, f, true);
local_bh_enable();
percpu_counter_destroy(&nf->mem);
} | 0 | [] | linux | 3ef0eb0db4bf92c6d2510fe5c4dc51852746f206 | 117,811,735,258,506,630,000,000,000,000,000,000,000 | 10 | net: frag, move LRU list maintenance outside of rwlock
Updating the fragmentation queues LRU (Least-Recently-Used) list,
required taking the hash writer lock. However, the LRU list isn't
tied to the hash at all, so we can use a separate lock for it.
Original-idea-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Je... |
static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table,
Item ***copy_func, bool modify_item)
{
DBUG_ASSERT(thd == table->in_use);
Field *new_field= item->Item::create_tmp_field(false, table);
if (copy_func &&
(item->is_result_field() ||
... | 0 | [
"CWE-89"
] | server | 5ba77222e9fe7af8ff403816b5338b18b342053c | 84,395,576,361,163,090,000,000,000,000,000,000,000 | 16 | MDEV-21028 Server crashes in Query_arena::set_query_arena upon SELECT from view
if the view has algorithm=temptable it is not updatable,
so DEFAULT() for its fields is meaningless,
and thus it's NULL or 0/'' for NOT NULL columns. |
long do_rt_tgsigqueueinfo(pid_t tgid, pid_t pid, int sig, siginfo_t *info)
{
/* This is only valid for single tasks */
if (pid <= 0 || tgid <= 0)
return -EINVAL;
/* Not even root can pretend to send signals from the kernel.
* Nor can they impersonate a kill()/tgkill(), which adds source info.
*/
if (info->si... | 0 | [] | linux-2.6 | 243b422af9ea9af4ead07a8ad54c90d4f9b6081a | 3,023,742,141,265,407,400,000,000,000,000,000,000 | 18 | Relax si_code check in rt_sigqueueinfo and rt_tgsigqueueinfo
Commit da48524eb206 ("Prevent rt_sigqueueinfo and rt_tgsigqueueinfo
from spoofing the signal code") made the check on si_code too strict.
There are several legitimate places where glibc wants to queue a
negative si_code different from SI_QUEUE:
- This was ... |
png_reciprocal2(png_fixed_point a, png_fixed_point b)
{
/* The required result is 1/a * 1/b; the following preserves accuracy. */
#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
if (a != 0 && b != 0)
{
double r = 1E15/a;
r /= b;
r = floor(r+.5);
if (r <= 2147483647. && r >= -2147483648.)
... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 87,474,577,602,302,330,000,000,000,000,000,000,000 | 27 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
static inline __u32 tcp_v4_init_sequence(const struct sk_buff *skb)
{
return secure_tcp_sequence_number(ip_hdr(skb)->daddr,
ip_hdr(skb)->saddr,
tcp_hdr(skb)->dest,
tcp_hdr(skb)->source);
} | 0 | [] | linux | 7bced397510ab569d31de4c70b39e13355046387 | 139,350,918,110,805,560,000,000,000,000,000,000,000 | 7 | net_dma: simple removal
Per commit "77873803363c net_dma: mark broken" net_dma is no longer used
and there is no plan to fix it.
This is the mechanical removal of bits in CONFIG_NET_DMA ifdef guards.
Reverting the remainder of the net_dma induced changes is deferred to
subsequent patches.
Marked for stable due to Ro... |
ip6t_do_table(struct sk_buff *skb,
unsigned int hook,
const struct net_device *in,
const struct net_device *out,
struct xt_table *table)
{
static const char nulldevname[IFNAMSIZ] __attribute__((aligned(sizeof(long))));
/* Initializing verdict to NF_DROP keeps gcc happy. */
unsigned int ve... | 0 | [
"CWE-200"
] | linux-2.6 | 6a8ab060779779de8aea92ce3337ca348f973f54 | 51,390,686,992,126,880,000,000,000,000,000,000,000 | 127 | ipv6: netfilter: ip6_tables: fix infoleak to userspace
Structures ip6t_replace, compat_ip6t_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sen... |
static struct file_struct *recv_file_entry(int f, struct file_list *flist, int xflags)
{
static int64 modtime, atime;
#ifdef SUPPORT_CRTIMES
static time_t crtime;
#endif
static mode_t mode;
#ifdef SUPPORT_HARD_LINKS
static int64 dev;
#endif
static dev_t rdev;
static uint32 rdev_major;
static uid_t uid;
static g... | 1 | [] | rsync | b7231c7d02cfb65d291af74ff66e7d8c507ee871 | 38,090,943,593,352,607,000,000,000,000,000,000,000 | 524 | Some extra file-list safety checks. |
void noinstr vmx_update_host_rsp(struct vcpu_vmx *vmx, unsigned long host_rsp)
{
if (unlikely(host_rsp != vmx->loaded_vmcs->host_state.rsp)) {
vmx->loaded_vmcs->host_state.rsp = host_rsp;
vmcs_writel(HOST_RSP, host_rsp);
}
} | 0 | [
"CWE-787"
] | linux | 04c4f2ee3f68c9a4bf1653d15f1a9a435ae33f7a | 152,101,600,524,120,120,000,000,000,000,000,000,000 | 7 | KVM: VMX: Don't use vcpu->run->internal.ndata as an array index
__vmx_handle_exit() uses vcpu->run->internal.ndata as an index for
an array access. Since vcpu->run is (can be) mapped to a user address
space with a writer permission, the 'ndata' could be updated by the
user process at anytime (the user process can set... |
nautilus_file_get_filesystem_id (NautilusFile *file)
{
return g_strdup (eel_ref_str_peek (file->details->filesystem_id));
} | 0 | [] | nautilus | 7632a3e13874a2c5e8988428ca913620a25df983 | 74,002,519,911,555,410,000,000,000,000,000,000,000 | 4 | Check for trusted desktop file launchers.
2009-02-24 Alexander Larsson <alexl@redhat.com>
* libnautilus-private/nautilus-directory-async.c:
Check for trusted desktop file launchers.
* libnautilus-private/nautilus-file-private.h:
* libnautilus-private/nautilus-file.c:
* libnautilus-... |
Proto_DumpRequest(ProtoRequest *req)
{
#if VGAUTH_PROTO_TRACE
printf("raw data: %s\n", req->rawData ? req->rawData : "<none>");
#endif
Debug("complete: %d\n", req->complete);
Debug("sequenceNumber: %d\n", req->sequenceNumber);
Log("requestType: %d(%s REQ)\n", req->reqType,
ProtoRequestTypeText(req->r... | 0 | [] | open-vm-tools | 70a74758bfe0042c27f15ce590fb21a2bc54d745 | 211,128,218,173,445,200,000,000,000,000,000,000,000 | 68 | Properly check authorization on incoming guestOps requests.
Fix public pipe request checks. Only a SessionRequest type should
be accepted on the public pipe. |
static void compute_status(HTTPContext *c)
{
HTTPContext *c1;
FFServerStream *stream;
char *p;
time_t ti;
int i, len;
AVIOContext *pb;
if (avio_open_dyn_buf(&pb) < 0) {
/* XXX: return an error ? */
c->buffer_ptr = c->buffer;
c->buffer_end = c->buffer;
return;... | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156 | 129,614,139,907,683,050,000,000,000,000,000,000,000 | 236 | ffserver: Check chunk size
Fixes out of array access
Fixes: poc_ffserver.py
Found-by: Paul Cher <paulcher@icloud.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
GF_Err sdp_box_dump(GF_Box *a, FILE * trace)
{
GF_SDPBox *p = (GF_SDPBox *)a;
gf_isom_box_dump_start(a, "SDPBox", trace);
gf_fprintf(trace, ">\n");
if (p->sdpText)
gf_fprintf(trace, "<!-- sdp text: %s -->\n", p->sdpText);
gf_isom_box_dump_done("SDPBox", a, trace);
return GF_OK;
} | 0 | [
"CWE-787"
] | gpac | ea1eca00fd92fa17f0e25ac25652622924a9a6a0 | 30,332,534,662,212,620,000,000,000,000,000,000,000 | 10 | fixed #2138 |
int security_sb_umount(struct vfsmount *mnt, int flags)
{
return security_ops->sb_umount(mnt, flags);
} | 0 | [] | linux-2.6 | ee18d64c1f632043a02e6f5ba5e045bb26a5465f | 286,842,494,500,364,500,000,000,000,000,000,000,000 | 4 | KEYS: Add a keyctl to install a process's session keyring on its parent [try #6]
Add a keyctl to install a process's session keyring onto its parent. This
replaces the parent's session keyring. Because the COW credential code does
not permit one process to change another process's credentials directly, the
change is... |
buf_hashtab_remove(buf_T *buf)
{
hashitem_T *hi = hash_find(&buf_hashtab, buf->b_key);
if (!HASHITEM_EMPTY(hi))
hash_remove(&buf_hashtab, hi);
} | 0 | [
"CWE-416"
] | vim | 9b4a80a66544f2782040b641498754bcb5b8d461 | 89,810,858,606,398,020,000,000,000,000,000,000,000 | 7 | patch 8.2.4281: using freed memory with :lopen and :bwipe
Problem: Using freed memory with :lopen and :bwipe.
Solution: Do not use a wiped out buffer. |
win_close_othertab(win_T *win, int free_buf, tabpage_T *tp)
{
win_T *wp;
int dir;
tabpage_T *ptp = NULL;
int free_tp = FALSE;
// Get here with win->w_buffer == NULL when win_close() detects the tab
// page changed.
if (win->w_closing || (win->w_buffer != NULL
&& win->w_buffe... | 0 | [
"CWE-476"
] | vim | 0f6e28f686dbb59ab3b562408ab9b2234797b9b1 | 53,829,153,657,282,155,000,000,000,000,000,000,000 | 63 | patch 8.2.4428: crash when switching tabpage while in the cmdline window
Problem: Crash when switching tabpage while in the cmdline window.
Solution: Disallow switching tabpage when in the cmdline window. |
static int ethtool_get_strings(struct net_device *dev, void __user *useraddr)
{
struct ethtool_gstrings gstrings;
const struct ethtool_ops *ops = dev->ethtool_ops;
u8 *data;
int ret;
if (!ops->get_strings || !ops->get_sset_count)
return -EOPNOTSUPP;
if (copy_from_user(&gstrings, useraddr, sizeof(gstrings)))
... | 0 | [
"CWE-190"
] | linux-2.6 | db048b69037e7fa6a7d9e95a1271a50dc08ae233 | 35,292,414,523,879,897,000,000,000,000,000,000,000 | 37 | ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL
On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer
overflow and the buffer may be smaller than needed. Since
ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at
least denial of service.
Signed-off-by: Ben Hutching... |
static inline int act_open_has_tid(int status)
{
return status != CPL_ERR_TCAM_FULL && status != CPL_ERR_CONN_EXIST &&
status != CPL_ERR_ARP_MISS;
} | 0 | [
"CWE-703"
] | linux | 67f1aee6f45059fd6b0f5b0ecb2c97ad0451f6b3 | 134,175,619,909,846,130,000,000,000,000,000,000,000 | 5 | iw_cxgb3: Fix incorrectly returning error on success
The cxgb3_*_send() functions return NET_XMIT_ values, which are
positive integers values. So don't treat positive return values
as an error.
Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off... |
void __fastcall TOwnConsole::WaitBeforeExit()
{
unsigned long Read;
INPUT_RECORD Record;
while (true)
{
if (PeekConsoleInput(FInput, &Record, 1, &Read) && (Read == 1) &&
ReadConsoleInput(FInput, &Record, 1, &Read) &&
(Read == 1) && (Record.EventType == KEY_EVENT) &&
(Record.... | 0 | [
"CWE-787"
] | winscp | faa96e8144e6925a380f94a97aa382c9427f688d | 117,445,352,118,464,380,000,000,000,000,000,000,000 | 18 | Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs
https://winscp.net/tracker/1943
(cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0)
Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b |
STATIC GC_descr GC_double_descr(GC_descr descriptor, word nwords)
{
if ((descriptor & GC_DS_TAGS) == GC_DS_LENGTH) {
descriptor = GC_bm_table[BYTES_TO_WORDS((word)descriptor)];
};
descriptor |= (descriptor & ~GC_DS_TAGS) >> nwords;
return(descriptor);
} | 0 | [
"CWE-119"
] | bdwgc | 4e1a6f9d8f2a49403bbd00b8c8e5324048fb84d4 | 244,067,845,680,989,830,000,000,000,000,000,000,000 | 8 | Fix calloc_explicitly_typed in case of lb*n overflow
* typd_mlc.c: Include limits.h (for SIZE_MAX).
* typd_mlc.c (GC_SIZE_MAX, GC_SQRT_SIZE_MAX): New macro (same as in
malloc.c).
* typd_mlc.c (GC_calloc_explicitly_typed): Return NULL if lb * n
overflows (same algorithm as in calloc defined in malloc.c); eliminate
lb *... |
*/
static int io_uring_add_task_file(struct io_ring_ctx *ctx, struct file *file)
{
struct io_uring_task *tctx = current->io_uring;
int ret;
if (unlikely(!tctx)) {
ret = io_uring_alloc_task_context(current, ctx);
if (unlikely(ret))
return ret;
tctx = current->io_uring;
}
if (tctx->last != file) {
void ... | 0 | [
"CWE-667"
] | linux | 3ebba796fa251d042be42b929a2d916ee5c34a49 | 54,108,590,586,203,890,000,000,000,000,000,000,000 | 40 | 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... |
static void inv_predict_3(uint8_t *p, const uint8_t *p_l, const uint8_t *p_tl,
const uint8_t *p_t, const uint8_t *p_tr)
{
AV_COPY32(p, p_tr);
} | 0 | [
"CWE-119",
"CWE-787"
] | FFmpeg | 6b5d3fb26fb4be48e4966e4b1d97c2165538d4ef | 101,966,767,602,587,050,000,000,000,000,000,000,000 | 5 | avcodec/webp: Always set pix_fmt
Fixes: out of array access
Fixes: 1434/clusterfuzz-testcase-minimized-6314998085189632
Fixes: 1435/clusterfuzz-testcase-minimized-6483783723253760
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Reviewed-by: "Ronald S. Bultje" <rsbult... |
void rdma_read_gids(struct rdma_cm_id *cm_id, union ib_gid *sgid,
union ib_gid *dgid)
{
struct rdma_addr *addr = &cm_id->route.addr;
if (!cm_id->device) {
if (sgid)
memset(sgid, 0, sizeof(*sgid));
if (dgid)
memset(dgid, 0, sizeof(*dgid));
return;
}
if (rdma_protocol_roce(cm_id->device, cm_id->po... | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 282,481,199,545,702,020,000,000,000,000,000,000,000 | 25 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
static void floppy_device_release(struct device *dev)
{
} | 0 | [
"CWE-264",
"CWE-754"
] | linux | ef87dbe7614341c2e7bfe8d32fcb7028cc97442c | 13,956,287,367,427,869,000,000,000,000,000,000,000 | 3 | floppy: ignore kernel-only members in FDRAWCMD ioctl input
Always clear out these floppy_raw_cmd struct members after copying the
entire structure from userspace so that the in-kernel version is always
valid and never left in an interdeterminate state.
Signed-off-by: Matthew Daley <mattd@bugfuzz.com>
Signed-off-by: L... |
z2restore(i_ctx_t *i_ctx_p)
{
alloc_save_t *asave;
bool saveLockSafety = gs_currentdevice_inline(igs)->LockSafetyParams;
int code = restore_check_save(i_ctx_p, &asave);
if (code < 0) return code;
while (gs_gstate_saved(gs_gstate_saved(igs))) {
if (restore_page_device(igs, gs_gstate_saved(i... | 1 | [] | ghostpdl | 3e5d316b72e3965b7968bb1d96baa137cd063ac6 | 102,282,685,054,241,300,000,000,000,000,000,000,000 | 30 | Bug 699718: Ensure stack space is available before gsrestore call out
During a grestore, if the device is going to change, we call out to Postscript
to restore the device configuration, before returning to restore the graphics
state internally.
We have to ensure sufficient op stack space is available to complete the
... |
bloat (bson_t *b)
{
uint32_t i;
char buf[16];
const char *key;
for (i = 0; i < 100; i++) {
bson_uint32_to_string (i, &key, buf, sizeof buf);
BSON_APPEND_UTF8 (b, key, "long useless value foo bar baz quux quizzle");
}
/* spilled over */
ASSERT (!(b->flags & BSON_FLAG_INLINE));
} | 0 | [
"CWE-125"
] | libbson | 42900956dc461dfe7fb91d93361d10737c1602b3 | 59,809,268,168,724,880,000,000,000,000,000,000,000 | 14 | CDRIVER-2269 Check for zero string length in codewscope |
static bool list_union(struct ldb_context *ldb,
struct ldb_kv_private *ldb_kv,
struct dn_list *list,
struct dn_list *list2)
{
struct ldb_val *dn3;
unsigned int i = 0, j = 0, k = 0;
if (list2->count == 0) {
/* X | 0 == X */
return true;
}
if (list->count == 0) {
/* 0 | X == X */
... | 0 | [
"CWE-20"
] | samba | 0998f2f1bced019db4000ef4b55887abcb65f6d2 | 141,071,101,216,691,960,000,000,000,000,000,000,000 | 76 | CVE-2018-1140 Add NULL check for ldb_dn_get_casefold() in ltdb_index_dn_attr()
Signed-off-by: Andrej Gessel <Andrej.Gessel@janztec.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13374 |
int pud_set_huge(pud_t *pudp, phys_addr_t phys, pgprot_t prot)
{
pgprot_t sect_prot = __pgprot(PUD_TYPE_SECT |
pgprot_val(mk_sect_prot(prot)));
BUG_ON(phys & ~PUD_MASK);
set_pud(pudp, pfn_pud(__phys_to_pfn(phys), sect_prot));
return 1;
} | 1 | [] | linux | 15122ee2c515a253b0c66a3e618bc7ebe35105eb | 59,579,855,626,005,930,000,000,000,000,000,000,000 | 8 | arm64: Enforce BBM for huge IO/VMAP mappings
ioremap_page_range doesn't honour break-before-make and attempts to put
down huge mappings (using p*d_set_huge) over the top of pre-existing
table entries. This leads to us leaking page table memory and also gives
rise to TLB conflicts and spurious aborts, which have been s... |
XmlDocument::New(xmlDoc* doc)
{
Nan::EscapableHandleScope scope;
if (doc->_private) {
return scope.Escape(static_cast<XmlDocument*>(doc->_private)->handle());
}
v8::Local<v8::Object> obj = Nan::NewInstance(Nan::GetFunction(Nan::New(constructor_template)).ToLocalChecked()).ToLocalChecked();
... | 0 | [
"CWE-400"
] | libxmljs | 2501807bde9b38cfaed06d1e140487516d91379d | 297,162,206,811,605,180,000,000,000,000,000,000,000 | 23 | Ensure parseXml/parseHtml input is string or buffer (#594) |
e_ews_connection_find_folder_items (EEwsConnection *cnc,
gint pri,
EwsFolderId *fid,
const gchar *default_props,
const EEwsAdditionalProps *add_props,
... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 231,541,859,592,650,780,000,000,000,000,000,000,000 | 90 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static long loop_control_ioctl(struct file *file, unsigned int cmd,
unsigned long parm)
{
struct loop_device *lo;
int ret = -ENOSYS;
mutex_lock(&loop_index_mutex);
switch (cmd) {
case LOOP_CTL_ADD:
ret = loop_lookup(&lo, parm);
if (ret >= 0) {
ret = -EEXIST;
break;
}
ret = loop_add(&lo, pa... | 0 | [
"CWE-416",
"CWE-362"
] | linux | ae6650163c66a7eff1acd6eb8b0f752dcfa8eba5 | 109,267,971,172,217,760,000,000,000,000,000,000,000 | 46 | loop: fix concurrent lo_open/lo_release
范龙飞 reports that KASAN can report a use-after-free in __lock_acquire.
The reason is due to insufficient serialization in lo_release(), which
will continue to use the loop device even after it has decremented the
lo_refcnt to zero.
In the meantime, another process can come in, o... |
static ssize_t mtu_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t len)
{
return netdev_store(dev, attr, buf, len, change_mtu); | 0 | [
"CWE-401"
] | linux | 895a5e96dbd6386c8e78e5b78e067dcc67b7f0ab | 119,719,136,967,291,950,000,000,000,000,000,000,000 | 5 | net-sysfs: Fix mem leak in netdev_register_kobject
syzkaller report this:
BUG: memory leak
unreferenced object 0xffff88837a71a500 (size 256):
comm "syz-executor.2", pid 9770, jiffies 4297825125 (age 17.843s)
hex dump (first 32 bytes):
00 00 00 00 ad 4e ad de ff ff ff ff 00 00 00 00 .....N..........
ff ff ... |
DoExtension(gif_source_ptr sinfo)
/* Process an extension block */
/* Currently we ignore 'em all */
{
int extlabel;
/* Read extension label byte */
extlabel = ReadByte(sinfo);
TRACEMS1(sinfo->cinfo, 1, JTRC_GIF_EXTENSION, extlabel);
/* Skip the data block(s) associated with the extension */
SkipDataBlocks... | 0 | [
"CWE-369"
] | libjpeg-turbo | 1719d12e51641cce5c77e259516649ba5ef6303c | 10,162,320,290,123,220,000,000,000,000,000,000,000 | 12 | cjpeg: Fix FPE when compressing 0-width GIF
Fixes #493 |
//! Construct image with specified size and initialize pixel values from a memory buffer \specialization.
CImg<T>& assign(const T *const values, const unsigned int size_x, const unsigned int size_y=1,
const unsigned int size_z=1, const unsigned int size_c=1) {
const size_t siz = (size_... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 70,747,056,752,399,210,000,000,000,000,000,000,000 | 25 | . |
int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
struct genl_info *info,
struct cfg80211_chan_def *chandef)
{
struct netlink_ext_ack *extack = info->extack;
struct nlattr **attrs = info->attrs;
u32 control_freq;
if (!attrs[NL80211_ATTR_WIPHY_FREQ])
return -EINVAL;
control_freq = nla... | 0 | [
"CWE-400",
"CWE-401"
] | linux | 1399c59fa92984836db90538cf92397fe7caaa57 | 119,017,010,484,506,930,000,000,000,000,000,000,000 | 105 | nl80211: fix memory leak in nl80211_get_ftm_responder_stats
In nl80211_get_ftm_responder_stats, a new skb is created via nlmsg_new
named msg. If nl80211hdr_put() fails, then msg should be released. The
return statement should be replace by goto to error handling code.
Fixes: 81e54d08d9d8 ("cfg80211: support FTM respo... |
ngx_http_send_special_response(ngx_http_request_t *r,
ngx_http_core_loc_conf_t *clcf, ngx_uint_t err)
{
u_char *tail;
size_t len;
ngx_int_t rc;
ngx_buf_t *b;
ngx_uint_t msie_padding;
ngx_chain_t out[3];
if (clcf->server_tokens == NGX_HTTP_SERVER_TOKENS_ON) {
... | 0 | [
"CWE-444",
"CWE-787"
] | nginx | c1be55f97211d38b69ac0c2027e6812ab8b1b94e | 78,367,321,319,848,440,000,000,000,000,000,000,000 | 112 | Discard request body when redirecting to a URL via error_page.
Reported by Bert JW Regeer and Francisco Oca Gonzalez. |
static int em_cmpxchg(struct x86_emulate_ctxt *ctxt)
{
/* Save real source value, then compare EAX against destination. */
ctxt->src.orig_val = ctxt->src.val;
ctxt->src.val = ctxt->regs[VCPU_REGS_RAX];
emulate_2op_SrcV(ctxt, "cmp");
if (ctxt->eflags & EFLG_ZF) {
/* Success: write back to memory. */
ctxt->dst.... | 0 | [] | kvm | e28ba7bb020f07193bc000453c8775e9d2c0dda7 | 285,855,222,729,639,100,000,000,000,000,000,000,000 | 17 | KVM: x86: fix missing checks in syscall emulation
On hosts without this patch, 32bit guests will crash (and 64bit guests
may behave in a wrong way) for example by simply executing following
nasm-demo-application:
[bits 32]
global _start
SECTION .text
_start: syscall
(I tested it with winxp and linux ... |
static double mp_fibonacci(_cimg_math_parser& mp) {
return cimg::fibonacci((int)_mp_arg(2));
} | 0 | [
"CWE-770"
] | cimg | 619cb58dd90b4e03ac68286c70ed98acbefd1c90 | 257,823,132,367,659,670,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. |
void mem_cgroup_commit_charge_swapin(struct page *page,
struct mem_cgroup *memcg)
{
__mem_cgroup_commit_charge_swapin(page, memcg,
MEM_CGROUP_CHARGE_TYPE_MAPPED);
} | 0 | [
"CWE-264"
] | linux-2.6 | 1a5a9906d4e8d1976b701f889d8f35d54b928f25 | 272,855,194,436,480,530,000,000,000,000,000,000,000 | 6 | 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(... |
static int rsi_mac80211_set_key(struct ieee80211_hw *hw,
enum set_key_cmd cmd,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct ieee80211_key_conf *key)
{
struct rsi_hw *adapter = hw->priv;
struct rsi_common *common = adapter->priv;
struct security_info *secinfo = &common->secinfo;
int s... | 0 | [
"CWE-416"
] | linux | abd39c6ded9db53aa44c2540092bdd5fb6590fa8 | 210,684,043,696,844,660,000,000,000,000,000,000,000 | 48 | rsi: add fix for crash during assertions
Observed crash in some scenarios when assertion has occurred,
this is because hw structure is freed and is tried to get
accessed in some functions where null check is already
present. So, avoided the crash by making the hw to NULL after
freeing.
Signed-off-by: Sanjay Konduri <... |
Unpickler_get_memo(UnpicklerObject *self)
{
return UnpicklerMemoProxy_New(self);
} | 0 | [
"CWE-190",
"CWE-369"
] | cpython | a4ae828ee416a66d8c7bf5ee71d653c2cc6a26dd | 124,714,755,330,546,230,000,000,000,000,000,000,000 | 4 | closes bpo-34656: Avoid relying on signed overflow in _pickle memos. (GH-9261) |
static int generate_fake_user_id(json_t * j_params, const char * username, unsigned char * user_id) {
char * seed;
unsigned char seed_hash[32];
size_t seed_hash_len = 32, seed_hash_b64_len;
int ret;
if ((seed = msprintf("%s%s-user_id", username, json_string_value(json_object_get(j_params, "seed")))) != NULL)... | 0 | [
"CWE-787"
] | glewlwyd | 4c5597c155bfbaf6491cf6b83479d241ae66940a | 31,720,117,615,266,840,000,000,000,000,000,000,000 | 25 | Fix possible buffer overflow |
static void io_req_free_batch(struct req_batch *rb, struct io_kiocb *req)
{
if (unlikely(io_is_fallback_req(req))) {
io_free_req(req);
return;
}
if (req->flags & REQ_F_LINK_HEAD)
io_queue_next(req);
if (req->task != rb->task) {
if (rb->task) {
atomic_long_add(rb->task_refs, &rb->task->io_uring->req_comp... | 0 | [] | linux | 0f2122045b946241a9e549c2a76cea54fa58a7ff | 293,757,991,991,394,530,000,000,000,000,000,000,000 | 24 | io_uring: don't rely on weak ->files references
Grab actual references to the files_struct. To avoid circular references
issues due to this, we add a per-task note that keeps track of what
io_uring contexts a task has used. When the tasks execs or exits its
assigned files, we cancel requests based on this tracking.
W... |
int X509v3_addr_inherits(IPAddrBlocks *addr)
{
int i;
if (addr == NULL)
return 0;
for (i = 0; i < sk_IPAddressFamily_num(addr); i++) {
IPAddressFamily *f = sk_IPAddressFamily_value(addr, i);
if (f->ipAddressChoice->type == IPAddressChoice_inherit)
return 1;
}
retu... | 0 | [
"CWE-119",
"CWE-787"
] | openssl | 068b963bb7afc57f5bdd723de0dd15e7795d5822 | 92,696,023,392,854,100,000,000,000,000,000,000,000 | 12 | Avoid out-of-bounds read
Fixes CVE 2017-3735
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
(Merged from https://github.com/openssl/openssl/pull/4276)
(cherry picked from commit b23171744b01e473ebbfd6edad70c1c3825ffbcd) |
cb_runas_default(const union sudo_defs_val *sd_un)
{
debug_decl(cb_runas_default, SUDOERS_DEBUG_PLUGIN);
/* Only reset runaspw if user didn't specify one. */
if (sudo_user.runas_user == NULL && sudo_user.runas_group == NULL)
debug_return_bool(set_runaspw(sd_un->str, true));
debug_return_bool(true);
} | 0 | [
"CWE-193"
] | sudo | 1f8638577d0c80a4ff864a2aad80a0d95488e9a8 | 338,908,294,619,575,840,000,000,000,000,000,000,000 | 9 | Fix potential buffer overflow when unescaping backslashes in user_args.
Also, do not try to unescaping backslashes unless in run mode *and*
we are running the command via a shell.
Found by Qualys, this fixes CVE-2021-3156. |
static int unix_seqpacket_sendmsg(struct socket *sock, struct msghdr *msg,
size_t len)
{
int err;
struct sock *sk = sock->sk;
err = sock_error(sk);
if (err)
return err;
if (sk->sk_state != TCP_ESTABLISHED)
return -ENOTCONN;
if (msg->msg_namelen)
msg->msg_namelen = 0;
return unix_dgram_sendmsg(soc... | 0 | [] | net | 7d267278a9ece963d77eefec61630223fce08c6c | 18,898,076,450,377,850,000,000,000,000,000,000,000 | 18 | unix: avoid use-after-free in ep_remove_wait_queue
Rainer Weikusat <rweikusat@mobileactivedefense.com> writes:
An AF_UNIX datagram socket being the client in an n:1 association with
some server socket is only allowed to send messages to the server if the
receive queue of this socket contains at most sk_max_ack_backlog... |
static int platform_legacy_suspend(struct device *dev, pm_message_t mesg)
{
struct platform_driver *pdrv = to_platform_driver(dev->driver);
struct platform_device *pdev = to_platform_device(dev);
int ret = 0;
if (dev->driver && pdrv->suspend)
ret = pdrv->suspend(pdev, mesg);
return ret;
} | 0 | [
"CWE-362",
"CWE-284"
] | linux | 6265539776a0810b7ce6398c27866ddb9c6bd154 | 227,753,212,506,716,600,000,000,000,000,000,000,000 | 11 | driver core: platform: fix race condition with driver_override
The driver_override implementation is susceptible to race condition when
different threads are reading vs storing a different driver override.
Add locking to avoid race condition.
Fixes: 3d713e0e382e ("driver core: platform: add device binding path 'drive... |
uint64_t ContentEncoding::EncryptionSize() const {
const uint64_t aes_size = enc_aes_settings_.Size();
uint64_t encryption_size = EbmlElementSize(libwebm::kMkvContentEncKeyID,
enc_key_id_, enc_key_id_length_);
encryption_size += EbmlElementSize(libwebm::kMkvContentEnc... | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 300,432,243,837,922,730,000,000,000,000,000,000,000 | 10 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
void TfLiteTensorFree(TfLiteTensor* t) {
TfLiteTensorDataFree(t);
if (t->dims) TfLiteIntArrayFree(t->dims);
t->dims = NULL;
if (t->dims_signature) {
TfLiteIntArrayFree((TfLiteIntArray *) t->dims_signature);
}
t->dims_signature = NULL;
TfLiteQuantizationFree(&t->quantization);
TfLiteSparsityFree(t-... | 0 | [
"CWE-190"
] | tensorflow | 7c8cc4ec69cd348e44ad6a2699057ca88faad3e5 | 32,717,732,374,445,050,000,000,000,000,000,000,000 | 14 | Fix a dangerous integer overflow and a malloc of negative size.
PiperOrigin-RevId: 371254154
Change-Id: I250a98a3df26328770167025670235a963a72da0 |
cmsUInt32Number CMSEXPORT cmsGetHeaderRenderingIntent(cmsHPROFILE hProfile)
{
_cmsICCPROFILE* Icc = (_cmsICCPROFILE*) hProfile;
return Icc -> RenderingIntent;
} | 0 | [] | Little-CMS | d2d902b9a03583ae482c782b2f243f7e5268a47d | 65,807,586,514,203,360,000,000,000,000,000,000,000 | 5 | >Changes from Richard Hughes |
void SSL_CTX_set0_security_ex_data(SSL_CTX *ctx, void *ex)
{
ctx->cert->sec_ex = ex;
} | 0 | [
"CWE-310"
] | openssl | cf6da05304d554aaa885151451aa4ecaa977e601 | 170,492,346,413,336,300,000,000,000,000,000,000,000 | 4 | Support TLS_FALLBACK_SCSV.
Reviewed-by: Stephen Henson <steve@openssl.org> |
static int __init arp_tables_init(void)
{
int ret;
ret = register_pernet_subsys(&arp_tables_net_ops);
if (ret < 0)
goto err1;
/* Noone else will be downing sem now, so we won't sleep */
ret = xt_register_targets(arpt_builtin_tg, ARRAY_SIZE(arpt_builtin_tg));
if (ret < 0)
goto err2;
/* Register setsockopt ... | 0 | [
"CWE-200"
] | linux-2.6 | 42eab94fff18cb1091d3501cd284d6bd6cc9c143 | 234,671,551,658,021,820,000,000,000,000,000,000,000 | 28 | netfilter: arp_tables: fix infoleak to userspace
Structures ipt_replace, compat_ipt_replace, and xt_get_revision are
copied from userspace. Fields of these structs that are
zero-terminated strings are not checked. When they are used as argument
to a format string containing "%s" in request_module(), some sensitive
i... |
int mdiobus_write(struct mii_bus *bus, int addr, u32 regnum, u16 val)
{
int err;
BUG_ON(in_interrupt());
mutex_lock(&bus->mdio_lock);
err = __mdiobus_write(bus, addr, regnum, val);
mutex_unlock(&bus->mdio_lock);
return err;
} | 0 | [
"CWE-416"
] | linux | 6ff7b060535e87c2ae14dd8548512abfdda528fb | 88,121,444,631,117,480,000,000,000,000,000,000,000 | 12 | mdio_bus: Fix use-after-free on device_register fails
KASAN has found use-after-free in fixed_mdio_bus_init,
commit 0c692d07842a ("drivers/net/phy/mdio_bus.c: call
put_device on device_register() failure") call put_device()
while device_register() fails,give up the last reference
to the device and allow mdiobus_releas... |
isoclns_print(netdissect_options *ndo,
const uint8_t *p, u_int length, u_int caplen)
{
if (caplen <= 1) { /* enough bytes on the wire ? */
ND_PRINT((ndo, "|OSI"));
return;
}
if (ndo->ndo_eflag)
ND_PRINT((ndo, "OSI NLPID %s (0x%02x): ", tok2str(nlpid_values, "Unknown", *p), *p));
switch (*p) {
... | 1 | [
"CWE-125",
"CWE-787"
] | tcpdump | 1dcd10aceabbc03bf571ea32b892c522cbe923de | 6,121,313,450,762,171,000,000,000,000,000,000,000 | 56 | 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 ieee80211_handle_assoc_resp(struct ieee80211_device *ieee, struct ieee80211_assoc_response
*frame, struct ieee80211_rx_stats *stats)
{
struct ieee80211_network network_resp = {
.ibss_dfs = NULL,
};
struct ieee80211_network *network = &network_resp;
struct net_device *dev = ieee->dev;
netwo... | 0 | [
"CWE-189"
] | linux-2.6 | 04045f98e0457aba7d4e6736f37eed189c48a5f7 | 119,727,202,436,558,600,000,000,000,000,000,000,000 | 60 | [IEEE80211]: avoid integer underflow for runt rx frames
Reported by Chris Evans <scarybeasts@gmail.com>:
> The summary is that an evil 80211 frame can crash out a victim's
> machine. It only applies to drivers using the 80211 wireless code, and
> only then to certain drivers (and even then depends on a card's
> firmw... |
virtual int key_cmp(const uchar *a,const uchar *b)
{ return cmp(a, b); } | 0 | [
"CWE-416",
"CWE-703"
] | server | 08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917 | 241,427,110,540,862,940,000,000,000,000,000,000,000 | 2 | MDEV-24176 Server crashes after insert in the table with virtual
column generated using date_format() and if()
vcol_info->expr is allocated on expr_arena at parsing stage. Since
expr item is allocated on expr_arena all its containee items must be
allocated on expr_arena too. Otherwise fix_session_expr() will
encounter... |
gdImageScaleBicubicFixed(gdImagePtr src, const unsigned int width,
const unsigned int height)
{
const long new_width = MAX(1, width);
const long new_height = MAX(1, height);
const int src_w = gdImageSX(src);
const int src_h = gdImageSY(src);
const gdFixed f_dx = gd_ftofx((float)src_w / (fl... | 0 | [
"CWE-125",
"CWE-191"
] | libgd | 60bfb401ad5a4a8ae995dcd36372fe15c71e1a35 | 93,569,761,439,495,190,000,000,000,000,000,000,000 | 223 | Fix potential unsigned underflow
No need to decrease `u`, so we don't do it. While we're at it, we also factor
out the overflow check of the loop, what improves performance and readability.
This issue has been reported by Stefan Esser to security@libgd.org. |
bool convert_string(LEX_CSTRING *to, CHARSET_INFO *to_cs,
const char *from, size_t from_length,
CHARSET_INFO *from_cs)
{
LEX_STRING tmp;
bool rc= convert_string(&tmp, to_cs, from, from_length, from_cs);
to->str= tmp.str;
to->length= tmp.length;
return ... | 0 | [
"CWE-416"
] | server | 4681b6f2d8c82b4ec5cf115e83698251963d80d5 | 275,398,107,519,430,420,000,000,000,000,000,000,000 | 10 | MDEV-26281 ASAN use-after-poison when complex conversion is involved in blob
the bug was that in_vector array in Item_func_in was allocated in the
statement arena, not in the table->expr_arena.
revert part of the 5acd391e8b2d. Instead, change the arena correctly
in fix_all_session_vcol_exprs().
Remove TABLE_ARENA, t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.