func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
static int selinux_socket_post_create(struct socket *sock, int family, int type, int protocol, int kern) { const struct task_security_struct *tsec = selinux_cred(current_cred()); struct inode_security_struct *isec = inode_security_novalidate(SOCK_INODE(sock)); struct sk_security_struct *sksec; u16 sclass ...
0
[ "CWE-349" ]
linux
fb73974172ffaaf57a7c42f35424d9aece1a5af6
292,874,941,250,459,550,000,000,000,000,000,000,000
33
selinux: properly handle multiple messages in selinux_netlink_send() Fix the SELinux netlink_send hook to properly handle multiple netlink messages in a single sk_buff; each message is parsed and subject to SELinux access control. Prior to this patch, SELinux only inspected the first message in the sk_buff. Cc: stab...
__ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, struct cfg80211_csa_settings *params) { struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); struct ieee80211_local *local = sdata->local; struct ieee80211_channel_switch ch_switch; struct ieee80211_chanctx_conf *conf; str...
0
[ "CWE-287" ]
linux
3e493173b7841259a08c5c8e5cbe90adb349da7e
240,713,853,708,974,520,000,000,000,000,000,000,000
90
mac80211: Do not send Layer 2 Update frame before authorization The Layer 2 Update frame is used to update bridges when a station roams to another AP even if that STA does not transmit any frames after the reassociation. This behavior was described in IEEE Std 802.11F-2003 as something that would happen based on MLME-...
date_to_datetime(VALUE self) { get_d1a(self); if (simple_dat_p(adat)) { VALUE new = d_lite_s_alloc_simple(cDateTime); { get_d1b(new); bdat->s = adat->s; return new; } } else { VALUE new = d_lite_s_alloc_complex(cDateTime); { get_d1b(new); bdat->c = adat->c; bdat->c.df...
0
[]
date
3959accef8da5c128f8a8e2fd54e932a4fb253b0
323,633,565,133,471,500,000,000,000,000,000,000,000
32
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`...
rsvg_new_filter_primitive_diffuse_lighting (const char *element_name, RsvgNode *parent) { RsvgFilterPrimitiveDiffuseLighting *filter; filter = g_new0 (RsvgFilterPrimitiveDiffuseLighting, 1); filter->super.in = g_string_new ("none"); filter->super.result = g_string_new ("none"); filter->surfaceScale...
0
[ "CWE-369" ]
librsvg
ecf9267a24b2c3c0cd211dbdfa9ef2232511972a
104,457,584,676,948,650,000,000,000,000,000,000,000
22
bgo#783835 - Don't divide by zero in box_blur_line() for gaussian blurs We were making the decision to use box blurs, instead of a true Gaussian kernel, based on the size of *both* x and y dimensions. Do them individually instead.
static void MSLCharacters(void *context,const xmlChar *c,int length) { MSLInfo *msl_info; register char *p; register ssize_t i; /* Receiving some characters from the parser. */ (void) LogMagickEvent(CoderEvent,GetMagickModule(), " SAX.characters(%s,%d)",c,length); msl_info=(MSLInfo...
0
[ "CWE-772", "CWE-787" ]
ImageMagick
e793eb203e5e0f91f5037aed6585e81b1e27395b
298,333,907,357,991,660,000,000,000,000,000,000,000
37
https://github.com/ImageMagick/ImageMagick/issues/636
dwarf_globname(Dwarf_Global glob, char **ret_name, Dwarf_Error * error) { if (glob == NULL) { _dwarf_error(NULL, error, DW_DLE_GLOBAL_NULL); return DW_DLV_ERROR; } *ret_name = (char *) (glob->gl_name); return DW_DLV_OK; }
0
[ "CWE-703", "CWE-125" ]
libdwarf-code
8151575a6ace77d005ca5bb5d71c1bfdba3f7069
298,179,577,306,825,300,000,000,000,000,000,000,000
12
Fixes vulnerability DW202205-001 Reports error instead of crashing the when reading a specially crafted (corrupted) .debug_pubnames or .debug_pubtypes section. modified: src/lib/libdwarf/dwarf_global.c
int index() const { return index_; }
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
301,992,786,374,013,550,000,000,000,000,000,000,000
1
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
void LibRaw::free_image(void) { if(imgdata.image) { free(imgdata.image); imgdata.image = 0; imgdata.progress_flags = LIBRAW_PROGRESS_START|LIBRAW_PROGRESS_OPEN |LIBRAW_PROGRESS_IDENTIFY|LIBRAW_PROGRESS_SIZE_ADJUST|LIBRAW_PROGRESS_LOAD_RAW; } }
0
[ "CWE-129" ]
LibRaw
89d065424f09b788f443734d44857289489ca9e2
268,930,773,034,782,500,000,000,000,000,000,000,000
11
fixed two more problems found by fuzzer
parse_argument_types(ufunc_T *fp, garray_T *argtypes, int varargs) { int len = 0; ga_init2(&fp->uf_type_list, sizeof(type_T *), 10); if (argtypes->ga_len > 0) { // When "varargs" is set the last name/type goes into uf_va_name // and uf_va_type. len = argtypes->ga_len - (varargs ? 1 : 0); if (len >...
0
[ "CWE-416" ]
vim
91c7cbfe31bbef57d5fcf7d76989fc159f73ef15
307,299,073,980,698,700,000,000,000,000,000,000,000
69
patch 9.0.0225: using freed memory with multiple line breaks in expression Problem: Using freed memory with multiple line breaks in expression. Solution: Free eval_tofree later.
server_set_bgcolor(struct xrdp_mod* mod, int bgcolor) { struct xrdp_painter* p; p = (struct xrdp_painter*)(mod->painter); if (p == 0) { return 0; } p->bg_color = bgcolor; return 0; }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
51,908,953,669,896,310,000,000,000,000,000,000,000
12
move temp files from /tmp to /tmp/.xrdp
void *umm_realloc( void *ptr, size_t size ) { void *ret; ptr = GET_UNPOISONED(ptr); /* check poison of each blocks, if poisoning is enabled */ if (!CHECK_POISON_ALL_BLOCKS()) { return NULL; } /* check full integrity of the heap, if this check is enabled */ if (!INTEGRITY_CHECK()) { return NULL;...
1
[ "CWE-190" ]
mongoose-os
b338266c0492cccdb8d8a93ee0b9217bc5a04036
75,732,249,285,670,050,000,000,000,000,000,000,000
24
Fix umm_malloc()
static int fanout_add(struct sock *sk, struct fanout_args *args) { struct packet_rollover *rollover = NULL; struct packet_sock *po = pkt_sk(sk); u16 type_flags = args->type_flags; struct packet_fanout *f, *match; u8 type = type_flags & 0xff; u8 flags = type_flags >> 8; u16 id = args->id; int err; switch (type...
0
[]
linux
c700525fcc06b05adfea78039de02628af79e07a
89,424,617,688,360,190,000,000,000,000,000,000,000
134
net/packet: fix slab-out-of-bounds access in packet_recvmsg() syzbot found that when an AF_PACKET socket is using PACKET_COPY_THRESH and mmap operations, tpacket_rcv() is queueing skbs with garbage in skb->cb[], triggering a too big copy [1] Presumably, users of af_packet using mmap() already gets correct metadata fr...
virtual void updateStrokeAdjust(GfxState * /*state*/) {}
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
231,038,491,312,375,460,000,000,000,000,000,000,000
1
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
start_tree(KBNODE *tree) { PACKET *pkt; pkt=xmalloc_clear(sizeof(*pkt)); pkt->pkttype=PKT_NONE; *tree=new_kbnode(pkt); delete_kbnode(*tree); }
0
[ "CWE-20" ]
gnupg
2183683bd633818dd031b090b5530951de76f392
336,684,977,460,026,000,000,000,000,000,000,000,000
9
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 ...
store_config_flag(struct lys_node *node, int options) { switch (node->nodetype) { case LYS_CONTAINER: case LYS_LEAF: case LYS_LEAFLIST: case LYS_LIST: case LYS_CHOICE: case LYS_ANYDATA: case LYS_ANYXML: if (options & LYS_PARSE_OPT_CFG_IGNORE) { node->flags |= node->fl...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
5,675,658,336,904,109,000,000,000,000,000,000,000
43
yang parser BUGFIX double free Fixes #742
int hmac_test() { HMAC<MD5> hmacMD5; byte hash[MD5::DIGEST_SIZE]; const char* keys[]= { "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b", "Jefe", "\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA\xAA" }; testVector test_hmacMD5[] = { ...
0
[]
mysql-server
5c6169fb309981b564a17bee31b367a18866d674
238,622,216,199,461,340,000,000,000,000,000,000,000
40
Bug #24740291: YASSL UPDATE TO 2.4.2
static int stimer_start(struct kvm_vcpu_hv_stimer *stimer) { u64 time_now; ktime_t ktime_now; time_now = get_time_ref_counter(hv_stimer_to_vcpu(stimer)->kvm); ktime_now = ktime_get(); if (stimer->config.periodic) { if (stimer->exp_time) { if (time_now >= stimer->exp_time) { u64 remainder; div64_u64...
0
[ "CWE-476" ]
linux
919f4ebc598701670e80e31573a58f1f2d2bf918
223,531,289,791,246,240,000,000,000,000,000,000,000
53
KVM: x86: hyper-v: Fix Hyper-V context null-ptr-deref Reported by syzkaller: KASAN: null-ptr-deref in range [0x0000000000000140-0x0000000000000147] CPU: 1 PID: 8370 Comm: syz-executor859 Not tainted 5.11.0-syzkaller #0 RIP: 0010:synic_get arch/x86/kvm/hyperv.c:165 [inline] RIP: 0010:kvm_hv_set_sint_gs...
static unsigned long __head *fixup_long(void *ptr, unsigned long physaddr) { return fixup_pointer(ptr, physaddr); }
0
[ "CWE-703" ]
linux
96e8fc5818686d4a1591bb6907e7fdb64ef29884
241,571,145,285,133,030,000,000,000,000,000,000,000
4
x86/xen: Use clear_bss() for Xen PV guests Instead of clearing the bss area in assembly code, use the clear_bss() function. This requires to pass the start_info address as parameter to xen_start_kernel() in order to avoid the xen_start_info being zeroed again. Signed-off-by: Juergen Gross <jgross@suse.com> Signed-of...
static void bfq_depth_updated(struct blk_mq_hw_ctx *hctx) { struct bfq_data *bfqd = hctx->queue->elevator->elevator_data; struct blk_mq_tags *tags = hctx->sched_tags; unsigned int min_shallow; min_shallow = bfq_update_depths(bfqd, &tags->bitmap_tags); sbitmap_queue_min_shallow_depth(&tags->bitmap_tags, min_shall...
0
[ "CWE-416" ]
linux
2f95fa5c955d0a9987ffdc3a095e2f4e62c5f2a9
46,526,425,900,655,000,000,000,000,000,000,000,000
9
block, bfq: fix use-after-free in bfq_idle_slice_timer_body In bfq_idle_slice_timer func, bfqq = bfqd->in_service_queue is not in bfqd-lock critical section. The bfqq, which is not equal to NULL in bfq_idle_slice_timer, may be freed after passing to bfq_idle_slice_timer_body. So we will access the freed memory. In ad...
void kvm_get_kvm(struct kvm *kvm) { atomic_inc(&kvm->users_count); }
0
[ "CWE-399" ]
kvm
5b40572ed5f0344b9dbee486a17c589ce1abe1a3
141,326,471,855,631,420,000,000,000,000,000,000,000
4
KVM: Ensure all vcpus are consistent with in-kernel irqchip settings If some vcpus are created before KVM_CREATE_IRQCHIP, then irqchip_in_kernel() and vcpu->arch.apic will be inconsistent, leading to potential NULL pointer dereferences. Fix by: - ensuring that no vcpus are installed when KVM_CREATE_IRQCHIP is called ...
get_struct_from_attrs(Attr a) { for (; 0 != a->name; a++) { if ('c' == *a->name && '\0' == *(a->name + 1)) { return structname2obj(a->value); } } return Qundef; }
0
[ "CWE-20" ]
ox
e4565dbc167f0d38c3f93243d7a4fcfc391cbfc8
278,280,961,686,314,720,000,000,000,000,000,000,000
8
Avoid crash with invalid XML passed to Oj.parse_obj()
void EvalMul(TfLiteContext* context, TfLiteNode* node, TfLiteMulParams* params, const OpData* data, const TfLiteTensor* input1, const TfLiteTensor* input2, TfLiteTensor* output) { tflite::ArithmeticParams op_params; const bool need_broadcast = optimized_ops::ProcessBroadcastShapes( G...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
267,485,363,915,171,170,000,000,000,000,000,000,000
48
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
startPS(linenr_T lnum, int para, int both) { char_u *s; s = ml_get(lnum); if (*s == para || *s == '\f' || (both && *s == '}')) return TRUE; if (*s == '.' && (inmacro(p_sections, s + 1) || (!para && inmacro(p_para, s + 1)))) return TRUE; return FALSE; }
0
[ "CWE-126", "CWE-787" ]
vim
53a70289c2712808e6d4e88927e03cac01b470dd
150,077,494,185,922,170,000,000,000,000,000,000,000
12
patch 8.2.4925: trailing backslash may cause reading past end of line Problem: Trailing backslash may cause reading past end of line. Solution: Check for NUL after backslash.
void user_revoke(struct key *key) { struct user_key_payload *upayload = key->payload.data[0]; /* clear the quota */ key_payload_reserve(key, 0); if (upayload) { rcu_assign_keypointer(key, NULL); kfree_rcu(upayload, rcu); } }
0
[ "CWE-284", "CWE-264", "CWE-269" ]
linux
096fe9eaea40a17e125569f9e657e34cdb6d73bd
76,665,574,584,036,190,000,000,000,000,000,000,000
12
KEYS: Fix handling of stored error in a negatively instantiated user key If a user key gets negatively instantiated, an error code is cached in the payload area. A negatively instantiated key may be then be positively instantiated by updating it with valid data. However, the ->update key type method must be aware th...
static OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k) { OPJ_UINT32 l_nb_bytes = 0; OPJ_UINT32 l_nb_comps; OPJ_UINT32 l_coc_bytes,l_qcc_bytes; l_nb_comps = p_j2k->m_private_image->numcomps - 1; l_nb_bytes += opj_j2k_get_max_toc_size(p_j2k); if (!(OPJ_IS_C...
0
[ "CWE-416" ]
openjpeg
940100c28ae28931722290794889cf84a92c5f6f
30,221,968,308,493,076,000,000,000,000,000,000,000
23
Fix potential use-after-free in opj_j2k_write_mco function Fixes #563
boost::optional<ServerDescriptionPtr> TopologyDescription::getPrimary() { if (getType() != TopologyType::kReplicaSetWithPrimary) { return boost::none; } auto foundPrimaries = findServers( [](const ServerDescriptionPtr& s) { return s->getType() == ServerType::kRSPrimary; }); invariant(fo...
0
[ "CWE-755" ]
mongo
75f7184eafa78006a698cda4c4adfb57f1290047
220,690,359,524,387,200,000,000,000,000,000,000,000
10
SERVER-50170 fix max staleness read preference parameter for server selection
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 3); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 2); const TfLiteTensor* lookup; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, 0, &lookup)); TF_LITE_ENSURE_EQ(context, NumDimensions(lookup), ...
0
[ "CWE-703", "CWE-369" ]
tensorflow
5117e0851348065ed59c991562c0ec80d9193db2
294,707,828,180,380,680,000,000,000,000,000,000,000
47
Prevent a division by 0 PiperOrigin-RevId: 371007407 Change-Id: Iecf2718de48d6bf5a69b02a9df9deda8ec1b19d3
struct lxc_popen_FILE *lxc_popen(const char *command) { int ret; int pipe_fds[2]; pid_t child_pid; struct lxc_popen_FILE *fp = NULL; ret = pipe2(pipe_fds, O_CLOEXEC); if (ret < 0) return NULL; child_pid = fork(); if (child_pid < 0) goto on_error; if (!child_pid) { sigset_t mask; close(pipe_fds[0]);...
0
[ "CWE-417" ]
lxc
c1cf54ebf251fdbad1e971679614e81649f1c032
217,987,165,997,724,960,000,000,000,000,000,000,000
92
CVE 2018-6556: verify netns fd in lxc-user-nic Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
//! Select sub-graph in a graph. CImg<intT> get_select_graph(CImgDisplay &disp, const unsigned int plot_type=1, const unsigned int vertex_type=1, const char *const labelx=0, const double xmin=0, const double xmax=0, ...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
24,261,089,533,938,194,000,000,000,000,000,000,000
253
Fix other issues in 'CImg<T>::load_bmp()'.
int slab_dead_cpu(unsigned int cpu) { mutex_lock(&slab_mutex); cpuup_canceled(cpu); mutex_unlock(&slab_mutex); return 0; }
0
[ "CWE-703" ]
linux
c4e490cf148e85ead0d1b1c2caaba833f1d5b29f
196,380,776,789,641,170,000,000,000,000,000,000,000
7
mm/slab.c: fix SLAB freelist randomization duplicate entries This patch fixes a bug in the freelist randomization code. When a high random number is used, the freelist will contain duplicate entries. It will result in different allocations sharing the same chunk. It will result in odd behaviours and crashes. It sh...
storagePoolLookupByUUID(virConnectPtr conn, const unsigned char *uuid) { virStoragePoolObj *obj; virStoragePoolDef *def; virStoragePoolPtr pool = NULL; obj = storagePoolObjFindByUUID(uuid, NULL); if (!obj) return NULL; def = virStoragePoolObjGetDef(obj); if ...
0
[]
libvirt
447f69dec47e1b0bd15ecd7cd49a9fd3b050fb87
319,214,543,344,736,030,000,000,000,000,000,000,000
21
storage_driver: Unlock object on ACL fail in storagePoolLookupByTargetPath 'virStoragePoolObjListSearch' returns a locked and refed object, thus we must release it on ACL permission failure. Fixes: 7aa0e8c0cb8 Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984318 Signed-off-by: Peter Krempa <pkrempa@redhat.co...
static long mg_sock_send(struct mg_connection *c, const void *buf, size_t len) { long n; if (c->is_udp) { union usa usa; socklen_t slen = tousa(&c->peer, &usa); n = sendto(FD(c), (char *) buf, len, 0, &usa.sa, slen); } else { n = send(FD(c), (char *) buf, len, MSG_NONBLOCKING); } return n == 0...
0
[ "CWE-552" ]
mongoose
c65c8fdaaa257e0487ab0aaae9e8f6b439335945
206,347,345,369,433,650,000,000,000,000,000,000,000
11
Protect against the directory traversal in mg_upload()
int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count) { struct snd_rawmidi_runtime *runtime = substream->runtime; int result; unsigned long flags; spin_lock_irqsave(&runtime->lock, flags); result = __snd_rawmidi_transmit_ack(substream, count); spin_unlock_irqrestore(&runtime->lock, fla...
0
[ "CWE-415" ]
linux
39675f7a7c7e7702f7d5341f1e0d01db746543a0
77,850,259,492,814,290,000,000,000,000,000,000,000
11
ALSA: rawmidi: Change resized buffers atomically The SNDRV_RAWMIDI_IOCTL_PARAMS ioctl may resize the buffers and the current code is racy. For example, the sequencer client may write to buffer while it being resized. As a simple workaround, let's switch to the resized buffer inside the stream runtime lock. Reported...
unsigned int tcp_poll(struct file *file, struct socket *sock, poll_table *wait) { unsigned int mask; struct sock *sk = sock->sk; struct tcp_sock *tp = tcp_sk(sk); sock_poll_wait(file, sk->sk_sleep, wait); if (sk->sk_state == TCP_LISTEN) return inet_csk_listen_poll(sk); /* Socket is not locked. We are protecte...
0
[ "CWE-400", "CWE-119", "CWE-703" ]
linux
baff42ab1494528907bf4d5870359e31711746ae
171,389,326,083,282,100,000,000,000,000,000,000,000
88
net: Fix oops from tcp_collapse() when using splice() tcp_read_sock() can have a eat skbs without immediately advancing copied_seq. This can cause a panic in tcp_collapse() if it is called as a result of the recv_actor dropping the socket lock. A userspace program that splices data from a socket to either another soc...
std::string JSON::JSON_bool::unparse(size_t) const { return value ? "true" : "false"; }
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
97,876,466,039,336,490,000,000,000,000,000,000,000
4
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len) { if (s->version >= TLS1_VERSION) { if (s->tlsext_session_ticket) { OPENSSL_free(s->tlsext_session_ticket); s->tlsext_session_ticket = NULL; } s->tlsext_session_ticket = OPENSSL_malloc(sizeof(TLS_SESSION_TICKET_EXT) + ext_len); i...
0
[]
openssl
edc032b5e3f3ebb1006a9c89e0ae00504f47966f
242,346,662,681,905,570,000,000,000,000,000,000,000
34
Add SRP support.
QPDFObjectHandle::isDictionary() { dereference(); return QPDFObjectTypeAccessor<QPDF_Dictionary>::check(obj.getPointer()); }
0
[ "CWE-835" ]
qpdf
afe0242b263a9e1a8d51dd81e42ab6de2e5127eb
40,479,708,850,785,003,000,000,000,000,000,000,000
5
Handle object ID 0 (fixes #99) This is CVE-2017-9208. The QPDF library uses object ID 0 internally as a sentinel to represent a direct object, but prior to this fix, was not blocking handling of 0 0 obj or 0 0 R as a special case. Creating an object in the file with 0 0 obj could cause various infinite loops. The PDF...
static int mem_resize(jas_stream_memobj_t *m, size_t bufsize) { unsigned char *buf; //assert(m->buf_); //assert(bufsize >= 0); JAS_DBGLOG(100, ("mem_resize(%p, %zu)\n", m, bufsize)); if (!bufsize) { jas_eprintf( "mem_resize was not really designed to handle a buffer of size 0\n" "This may not work.\n" ...
0
[ "CWE-415", "CWE-190", "CWE-369" ]
jasper
634ce8e8a5accc0fa05dd2c20d42b4749d4b2735
267,434,358,569,986,300,000,000,000,000,000,000,000
25
Made some changes to the I/O stream library for memory streams. There were a number of potential problems due to the possibility of integer overflow. Changed some integral types to the larger types size_t or ssize_t. For example, the function mem_resize now takes the buffer size parameter as a size_t. Added a new funct...
void t_cpp_generator::generate_serialize_list_element(ofstream& out, t_list* tlist, string iter) { t_field efield(tlist->get_elem_type(), "(*" + iter + ")"); generate_serialize_field(out, &efield, ""); }
0
[ "CWE-20" ]
thrift
cfaadcc4adcfde2a8232c62ec89870b73ef40df1
111,825,774,515,808,530,000,000,000,000,000,000,000
4
THRIFT-3231 CPP: Limit recursion depth to 64 Client: cpp Patch: Ben Craig <bencraig@apache.org>
void nl80211_send_disconnected(struct cfg80211_registered_device *rdev, struct net_device *netdev, u16 reason, const u8 *ie, size_t ie_len, bool from_ap) { struct sk_buff *msg; void *hdr; msg = nlmsg_new(NLMSG_GOODSIZE, GFP_KERNEL); if (!msg) return; hdr = nl80211hdr_put(msg, 0, 0, 0, NL80...
0
[ "CWE-362", "CWE-119" ]
linux
208c72f4fe44fe09577e7975ba0e7fa0278f3d03
54,854,629,961,532,880,000,000,000,000,000,000,000
40
nl80211: fix check for valid SSID size in scan operations In both trigger_scan and sched_scan operations, we were checking for the SSID length before assigning the value correctly. Since the memory was just kzalloc'ed, the check was always failing and SSID with over 32 characters were allowed to go through. This was...
static void bundle_add_conn(struct connectbundle *bundle, struct connectdata *conn) { Curl_llist_insert_next(&bundle->conn_list, bundle->conn_list.tail, conn, &conn->bundle_node); conn->bundle = bundle; bundle->num_connections++; }
0
[]
curl
058f98dc3fe595f21dc26a5b9b1699e519ba5705
9,209,334,938,478,411,000,000,000,000,000,000,000
8
conncache: include the zone id in the "bundle" hashkey Make connections to two separate IPv6 zone ids create separate connections. Reported-by: Harry Sintonen Bug: https://curl.se/docs/CVE-2022-27775.html Closes #8747
static BOOL planar_subsample_expand(const BYTE* plane, size_t planeLength, UINT32 nWidth, UINT32 nHeight, UINT32 nPlaneWidth, UINT32 nPlaneHeight, BYTE* deltaPlane) { size_t pos = 0; UINT32 y; if (!plane || !deltaPlane) return FALSE; if (nWi...
0
[ "CWE-125" ]
FreeRDP
17f547ae11835bb11baa3d045245dc1694866845
15,220,272,475,895,035,000,000,000,000,000,000,000
28
Fixed CVE-2020-11521: Out of bounds write in planar codec. Thanks to Sunglin and HuanGMz from Knownsec 404
static int datablob_parse(char *datablob, struct trusted_key_payload *p, struct trusted_key_options *o) { substring_t args[MAX_OPT_ARGS]; long keylen; int ret = -EINVAL; int key_cmd; char *c; /* main command */ c = strsep(&datablob, " \t"); if (!c) return -EINVAL; key_cmd = match_token(c, key_tokens, a...
0
[ "CWE-284", "CWE-264", "CWE-269" ]
linux
096fe9eaea40a17e125569f9e657e34cdb6d73bd
25,051,518,033,994,357,000,000,000,000,000,000,000
58
KEYS: Fix handling of stored error in a negatively instantiated user key If a user key gets negatively instantiated, an error code is cached in the payload area. A negatively instantiated key may be then be positively instantiated by updating it with valid data. However, the ->update key type method must be aware th...
static void perf_event_context_sched_out(struct task_struct *task, int ctxn, struct task_struct *next) { struct perf_event_context *ctx = task->perf_event_ctxp[ctxn]; struct perf_event_context *next_ctx; struct perf_event_context *parent, *next_parent; struct perf_cpu_context *cpuctx; int do_switch = 1; str...
0
[ "CWE-401" ]
tip
7bdb157cdebbf95a1cd94ed2e01b338714075d00
20,943,664,677,965,960,000,000,000,000,000,000,000
97
perf/core: Fix a memory leak in perf_event_parse_addr_filter() As shown through runtime testing, the "filename" allocation is not always freed in perf_event_parse_addr_filter(). There are three possible ways that this could happen: - It could be allocated twice on subsequent iterations through the loop, - or leake...
int invalidate_inodes(struct super_block *sb, bool kill_dirty) { int busy = 0; struct inode *inode, *next; LIST_HEAD(dispose); spin_lock(&sb->s_inode_list_lock); list_for_each_entry_safe(inode, next, &sb->s_inodes, i_sb_list) { spin_lock(&inode->i_lock); if (inode->i_state & (I_NEW | I_FREEING | I_WILL_FREE))...
0
[ "CWE-269" ]
linux
0fa3ecd87848c9c93c2c828ef4c3a8ca36ce46c7
112,465,454,208,974,410,000,000,000,000,000,000,000
35
Fix up non-directory creation in SGID directories sgid directories have special semantics, making newly created files in the directory belong to the group of the directory, and newly created subdirectories will also become sgid. This is historically used for group-shared directories. But group directories writable b...
static int make_tempfile(char *filename, const char *ext) { int fd= 0; if ((fd=create_temp_file(filename, NullS, ext, O_CREAT | O_WRONLY, MYF(MY_WME))) < 0) { fprintf(stderr, "ERROR: Cannot generate temporary file. Error code: %d.\n", fd); return 1; } my_close(fd, MYF(0)); retu...
0
[ "CWE-200" ]
mysql-server
0dbd5a8797ed4bd18e8b883988fb62177eb0f73f
117,077,460,480,790,530,000,000,000,000,000,000,000
14
Bug#21973610: BUFFER OVERFLOW ISSUES Description : Incorrect usage of sprintf/strcpy caused possible buffer overflow issues at various places. Solution : - Fixed mysql_plugin and mysqlshow - Fixed regex library issues Reviewed-By : Georgi Kodinov <georgi.kodinov@oracle.com> Rev...
wb_write_out(struct archive_write *a) { struct iso9660 *iso9660 = (struct iso9660 *)a->format_data; size_t wsize, nw; int r; wsize = sizeof(iso9660->wbuff) - iso9660->wbuff_remaining; nw = wsize % LOGICAL_BLOCK_SIZE; if (iso9660->wbuff_type == WB_TO_STREAM) r = __archive_write_output(a, iso9660->wbuff, wsize -...
0
[ "CWE-190" ]
libarchive
3014e19820ea53c15c90f9d447ca3e668a0b76c6
329,757,587,529,003,720,000,000,000,000,000,000,000
23
Issue 711: Be more careful about verifying filename lengths when writing ISO9660 archives * Don't cast size_t to int, since this can lead to overflow on machines where sizeof(int) < sizeof(size_t) * Check a + b > limit by writing it as a > limit || b > limit || a + b > limit to avoid problems when a + b wraps...
DLLEXPORT int tjPlaneWidth(int componentID, int width, int subsamp) { int pw, nc, retval=0; if(width<1 || subsamp<0 || subsamp>=TJ_NUMSAMP) _throw("tjPlaneWidth(): Invalid argument"); nc=(subsamp==TJSAMP_GRAY? 1:3); if(componentID<0 || componentID>=nc) _throw("tjPlaneWidth(): Invalid argument"); pw=PAD(width...
0
[]
libjpeg-turbo
dab6be4cfb2f9307b5378d2d1dc74d9080383dc2
136,939,125,404,021,300,000,000,000,000,000,000,000
19
tjDecompressToYUV*(): Fix OOB write/double free ... when attempting to decompress grayscale JPEG images with sampling factors != 1. Fixes #387
static NTSTATUS ldapsrv_SearchRequest(struct ldapsrv_call *call) { struct ldap_SearchRequest *req = &call->request->r.SearchRequest; struct ldap_Result *done; struct ldapsrv_reply *done_r; TALLOC_CTX *local_ctx; struct ldapsrv_context *callback_ctx = NULL; struct ldb_context *samdb = talloc_get_type(call->conn->l...
1
[ "CWE-703" ]
samba
3e8d6e681f8dbe79e4595549f78c42649b3573a2
19,950,745,335,405,963,000,000,000,000,000,000,000
235
CVE-2021-3670 ldap_server: Clearly log LDAP queries and timeouts This puts all the detail on one line so it can be searched by IP address and connecting SID. This relies on the anr handling as otherwise this log becomes the expanded query, not the original one. RN: Provide clear logs of the LDAP search and who made ...
static int __init nr_proto_init(void) { int i; int rc = proto_register(&nr_proto, 0); if (rc != 0) goto out; if (nr_ndevs > 0x7fffffff/sizeof(struct net_device *)) { printk(KERN_ERR "NET/ROM: nr_proto_init - nr_ndevs parameter to large\n"); return -1; } dev_nr = kzalloc(nr_ndevs * sizeof(struct net_devic...
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
191,768,126,090,097,500,000,000,000,000,000,000,000
71
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
asn1_der_decoding (asn1_node * element, const void *ider, int ider_len, char *errorDescription) { asn1_node node, p, p2, p3; char temp[128]; int counter, len2, len3, len4, move, ris, tlen; unsigned char class; unsigned long tag; int indefinite, result; const unsigned char *der = ider; node = *elem...
1
[]
libtasn1
37a16434131c6ad8745b9accefec5cecb4cbb5b7
127,312,813,445,654,580,000,000,000,000,000,000,000
589
expanded usage of DECR_LEN().
static struct dyn_lease *add_lease( const uint8_t *chaddr, uint32_t yiaddr, leasetime_t leasetime, const char *hostname, int hostname_len) { struct dyn_lease *oldest; /* clean out any old ones */ clear_leases(chaddr, yiaddr); oldest = oldest_expired_lease(); if (oldest) { memset(oldest, 0, sizeof(*oldes...
0
[ "CWE-125" ]
busybox
6d3b4bb24da9a07c263f3c1acf8df85382ff562c
166,937,717,179,587,300,000,000,000,000,000,000,000
41
udhcpc: check that 4-byte options are indeed 4-byte, closes 11506 function old new delta udhcp_get_option32 - 27 +27 udhcp_get_option 231 248 +17 ----------------------------------...
void btrfs_dec_block_group_ro(struct btrfs_block_group *cache) { struct btrfs_space_info *sinfo = cache->space_info; u64 num_bytes; BUG_ON(!cache->ro); spin_lock(&sinfo->lock); spin_lock(&cache->lock); if (!--cache->ro) { if (btrfs_is_zoned(cache->fs_info)) { /* Migrate zone_unusable bytes back */ cache...
0
[ "CWE-703", "CWE-667" ]
linux
1cb3db1cf383a3c7dbda1aa0ce748b0958759947
155,332,793,209,495,930,000,000,000,000,000,000,000
25
btrfs: fix deadlock with concurrent chunk allocations involving system chunks When a task attempting to allocate a new chunk verifies that there is not currently enough free space in the system space_info and there is another task that allocated a new system chunk but it did not finish yet the creation of the respecti...
mono_image_get_ctorbuilder_token (MonoDynamicImage *assembly, MonoReflectionCtorBuilder *mb) { guint32 token; ReflectionMethodBuilder rmb; char *name; token = GPOINTER_TO_UINT (g_hash_table_lookup (assembly->handleref, mb)); if (token) return token; reflection_methodbuilder_from_ctor_builder (&rmb, mb); na...
0
[ "CWE-20" ]
mono
4905ef1130feb26c3150b28b97e4a96752e0d399
263,229,303,097,339,100,000,000,000,000,000,000,000
20
Handle invalid instantiation of generic methods. * verify.c: Add new function to internal verifier API to check method instantiations. * reflection.c (mono_reflection_bind_generic_method_parameters): Check the instantiation before returning it. Fixes #655847
void dev_disable_lro(struct net_device *dev) { struct net_device *lower_dev; struct list_head *iter; dev->wanted_features &= ~NETIF_F_LRO; netdev_update_features(dev); if (unlikely(dev->features & NETIF_F_LRO)) netdev_WARN(dev, "failed to disable LRO!\n"); netdev_for_each_lower_dev(dev, lower_dev, iter) de...
0
[ "CWE-400", "CWE-703" ]
linux
fac8e0f579695a3ecbc4d3cac369139d7f819971
247,233,968,371,566,880,000,000,000,000,000,000,000
14
tunnels: Don't apply GRO to multiple layers of encapsulation. When drivers express support for TSO of encapsulated packets, they only mean that they can do it for one layer of encapsulation. Supporting additional levels would mean updating, at a minimum, more IP length fields and they are unaware of this. No encapsul...
size_t curlWriter(char* data, size_t size, size_t nmemb, std::string* writerData) { if (writerData == NULL) return 0; writerData->append(data, size*nmemb); return size * nmemb; }
0
[ "CWE-125" ]
exiv2
6e3855aed7ba8bb4731fc4087ca7f9078b2f3d97
291,574,873,332,240,470,000,000,000,000,000,000,000
7
Fix https://github.com/Exiv2/exiv2/issues/55
Http2Session::~Http2Session() { CHECK(!is_in_scope()); Debug(this, "freeing nghttp2 session"); // Explicitly reset session_ so the subsequent // current_nghttp2_memory_ check passes. session_.reset(); CHECK_EQ(current_nghttp2_memory_, 0); }
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
269,812,112,907,212,940,000,000,000,000,000,000,000
8
http2: update handling of rst_stream with error code NGHTTP2_CANCEL The PR updates the handling of rst_stream frames and adds all streams to the pending list on receiving rst frames with the error code NGHTTP2_CANCEL. The changes will remove dependency on the stream state that may allow bypassing the checks in certai...
void ns_put32(unsigned long src, unsigned char *dst) { NS_PUT32(src, dst); }
0
[ "CWE-79" ]
uclibc-ng
0f822af0445e5348ce7b7bd8ce1204244f31d174
121,905,619,296,771,800,000,000,000,000,000,000,000
4
libc/inet/resolv.c: add __hnbad to check DNS entries for validity… … using the same rules glibc does also call __hnbad in some places to check answers
static void ip_ra_destroy_rcu(struct rcu_head *head) { struct ip_ra_chain *ra = container_of(head, struct ip_ra_chain, rcu); sock_put(ra->saved_sk); kfree(ra); }
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
319,870,121,976,514,270,000,000,000,000,000,000,000
7
inet: add RCU protection to inet->opt We lack proper synchronization to manipulate inet->opt ip_options Problem is ip_make_skb() calls ip_setup_cork() and ip_setup_cork() possibly makes a copy of ipc->opt (struct ip_options), without any protection against another thread manipulating inet->opt. Another thread can ch...
R_API ut64 r_bin_java_get_method_end(RBinJavaObj *bin, RBinJavaField *fm_type) { return r_bin_java_get_method_code_offset (fm_type) + bin->loadaddr + +r_bin_java_get_method_code_size (fm_type); }
0
[ "CWE-119", "CWE-788" ]
radare2
6c4428f018d385fc80a33ecddcb37becea685dd5
148,791,121,784,758,830,000,000,000,000,000,000,000
4
Improve boundary checks to fix oobread segfaults ##crash * Reported by Cen Zhang via huntr.dev * Reproducer: bins/fuzzed/javaoob-havoc.class
qtdemux_tag_add_keywords (GstQTDemux * qtdemux, GstTagList * taglist, const char *tag, const char *dummy, GNode * node) { const gchar *env_vars[] = { "GST_QT_TAG_ENCODING", "GST_TAG_ENCODING", NULL }; guint8 *data; char *s, *t, *k = NULL; int len; int offset; int count; /* first try normal string tag...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
179,728,621,034,548,300,000,000,000,000,000,000,000
75
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
PackLinuxElf32::PackLinuxElf32help1(InputFile *f) { e_type = get_te16(&ehdri.e_type); e_phnum = get_te16(&ehdri.e_phnum); e_shnum = get_te16(&ehdri.e_shnum); unsigned const e_phentsize = get_te16(&ehdri.e_phentsize); if (ehdri.e_ident[Elf32_Ehdr::EI_CLASS]!=Elf32_Ehdr::ELFCLASS32 || sizeof(Elf3...
0
[ "CWE-476" ]
upx
ef336dbcc6dc8344482f8cf6c909ae96c3286317
60,285,545,537,128,320,000,000,000,000,000,000,000
64
Protect against bad crafted input. https://github.com/upx/upx/issues/128 modified: p_lx_elf.cpp
MagickExport char *EscapeString(const char *source,const char escape) { char *destination; register char *q; register const char *p; size_t length; assert(source != (const char *) NULL); length=0; for (p=source; *p != '\0'; p++) { if ((*p == '\\') || (*p == escape)) { ...
0
[ "CWE-190" ]
ImageMagick
be90a5395695f0d19479a5d46b06c678be7f7927
77,809,923,935,936,560,000,000,000,000,000,000,000
43
https://github.com/ImageMagick/ImageMagick/issues/1721
int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont, BN_CTX *ctx) { return BN_mod_mul_montgomery(r, a, &(mont->RR), mont, ctx); }
0
[ "CWE-310" ]
openssl
aab7c770353b1dc4ba045938c8fb446dd1c4531e
139,912,457,571,811,050,000,000,000,000,000,000,000
5
Elliptic curve scalar multiplication with timing attack defenses Co-authored-by: Nicola Tuveri <nic.tuv@gmail.com> Co-authored-by: Cesar Pereida Garcia <cesar.pereidagarcia@tut.fi> Co-authored-by: Sohaib ul Hassan <soh.19.hassan@gmail.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Matt Caswell <matt...
CImg<T>& draw_spline(const CImg<tp>& points, const tc *const color, const float opacity=1, const bool is_closed_set=false, const float precision=4, const unsigned int pattern=~0U, const bool init_hatch=true) { if (is_empty() || !points...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
143,025,917,402,265,400,000,000,000,000,000,000,000
76
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static int cap_msg_queue_alloc_security(struct msg_queue *msq) { return 0; }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
318,871,075,691,154,420,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...
static void rds_iw_remove_one(struct ib_device *device) { struct rds_iw_device *rds_iwdev; struct rds_iw_cm_id *i_cm_id, *next; rds_iwdev = ib_get_client_data(device, &rds_iw_client); if (!rds_iwdev) return; spin_lock_irq(&rds_iwdev->spinlock); list_for_each_entry_safe(i_cm_id, next, &rds_iwdev->cm_id_list, l...
0
[ "CWE-476" ]
net-next
bf39b4247b8799935ea91d90db250ab608a58e50
133,196,737,593,362,070,000,000,000,000,000,000,000
32
rds: prevent dereference of a NULL device in rds_iw_laddr_check Binding might result in a NULL device which is later dereferenced without checking. Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
static int mb86a20s_initfe(struct dvb_frontend *fe) { struct mb86a20s_state *state = fe->demodulator_priv; u64 pll; u32 fclk; int rc; u8 regD5 = 1, reg71, reg09 = 0x3a; dev_dbg(&state->i2c->dev, "%s called.\n", __func__); if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0); /* Initialize the frontend ...
0
[ "CWE-119" ]
media_tree
eca2d34b9d2ce70165a50510659838e28ca22742
118,138,110,020,755,400,000,000,000,000,000,000,000
115
[media] mb86a20s: apply mask to val after checking for read failure Appling the mask 0x0f to the immediate return of the call to mb86a20s_readreg will always result in a positive value, meaning that the check of ret < 0 will never work. Instead, check for a -ve return value first, and then mask val with 0x0f. Kudos ...
static int parse_import_ptr(struct MACH0_(obj_t)* bin, struct reloc_t *reloc, int idx) { int i, j, sym, wordsize; ut32 stype; wordsize = MACH0_(get_bits)(bin) / 8; if (idx < 0 || idx >= bin->nsymtab) { return 0; } if ((bin->symtab[idx].n_desc & REFERENCE_TYPE) == REFERENCE_FLAG_UNDEFINED_LAZY) { stype = S_LAZ...
0
[ "CWE-415", "CWE-125" ]
radare2
60208765887f5f008b3b9a883f3addc8bdb9c134
146,166,799,062,823,580,000,000,000,000,000,000,000
45
Fix #9970 - heap oobread in mach0 parser (#10026)
nfs3svc_decode_symlinkargs(struct svc_rqst *rqstp, __be32 *p, struct nfsd3_symlinkargs *args) { unsigned int len, avail; char *old, *new; struct kvec *vec; if (!(p = decode_fh(p, &args->ffh)) || !(p = decode_filename(p, &args->fname, &args->flen)) ) return 0; p = decode_sattr3(p, &args->attrs); /*...
1
[ "CWE-119", "CWE-703" ]
linux
13bf9fbff0e5e099e2b6f003a0ab8ae145436309
323,815,675,990,547,570,000,000,000,000,000,000,000
48
nfsd: stricter decoding of write-like NFSv2/v3 ops The NFSv2/v3 code does not systematically check whether we decode past the end of the buffer. This generally appears to be harmless, but there are a few places where we do arithmetic on the pointers involved and don't account for the possibility that a length could b...
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { auto* params = reinterpret_cast<TfLiteSpaceToDepthParams*>(node->builtin_data); TF_LITE_ENSURE_EQ(context, NumInputs(node), 1); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInp...
1
[ "CWE-369" ]
tensorflow
0d45ea1ca641b21b73bcf9c00e0179cda284e7e7
31,179,933,714,560,960,000,000,000,000,000,000,000
39
Prevent one more div by 0 in TFLite PiperOrigin-RevId: 370800114 Change-Id: I6b956aeb8c458cc6f514408d2e89ffacfe249e57
tracing_thresh_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos) { return tracing_nsecs_read(&tracing_thresh, ubuf, cnt, ppos); }
0
[ "CWE-415" ]
linux
4397f04575c44e1440ec2e49b6302785c95fd2f8
31,141,696,447,513,520,000,000,000,000,000,000,000
5
tracing: Fix possible double free on failure of allocating trace buffer Jing Xia and Chunyan Zhang reported that on failing to allocate part of the tracing buffer, memory is freed, but the pointers that point to them are not initialized back to NULL, and later paths may try to free the freed memory again. Jing and Chu...
void arch_cpu_idle(void) { if (cpuidle_idle_call()) default_idle(); }
0
[ "CWE-284", "CWE-264" ]
linux
a4780adeefd042482f624f5e0d577bf9cdcbb760
226,626,290,669,879,630,000,000,000,000,000,000,000
5
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 ...
TfLiteStatus PreluEval(TfLiteContext* context, TfLiteNode* node) { const TfLiteTensor* input = GetInput(context, node, 0); const TfLiteTensor* alpha = GetInput(context, node, 1); TfLiteTensor* output = GetOutput(context, node, 0); const PreluOpData* data = reinterpret_cast<PreluOpData*>(node->user_data); swit...
1
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
173,155,933,280,233,200,000,000,000,000,000,000,000
94
[tflite]: Insert `nullptr` checks when obtaining tensors. As part of ongoing refactoring, `tflite::GetInput`, `tflite::GetOutput`, `tflite::GetTemporary` and `tflite::GetIntermediates` will return `nullptr` in some cases. Hence, we insert the `nullptr` checks on all usages. We also insert `nullptr` checks on usages o...
void nfc_unregister_device(struct nfc_dev *dev) { int rc; pr_debug("dev_name=%s\n", dev_name(&dev->dev)); rc = nfc_genl_device_removed(dev); if (rc) pr_debug("The userspace won't be notified that the device %s " "was removed\n", dev_name(&dev->dev)); device_lock(&dev->dev); if (dev->rfkill) { rfkill_un...
1
[ "CWE-416" ]
linux
da5c0f119203ad9728920456a0f52a6d850c01cd
120,110,004,796,941,230,000,000,000,000,000,000,000
33
nfc: replace improper check device_is_registered() in netlink related functions The device_is_registered() in nfc core is used to check whether nfc device is registered in netlink related functions such as nfc_fw_download(), nfc_dev_up() and so on. Although device_is_registered() is protected by device_lock, there is ...
static void rfcomm_tty_send_xchar(struct tty_struct *tty, char ch) { BT_DBG("tty %p ch %c", tty, ch); }
0
[ "CWE-200" ]
linux
f9432c5ec8b1e9a09b9b0e5569e3c73db8de432a
131,152,960,446,340,900,000,000,000,000,000,000,000
4
Bluetooth: RFCOMM - Fix info leak in ioctl(RFCOMMGETDEVLIST) The RFCOMM code fails to initialize the two padding bytes of struct rfcomm_dev_list_req inserted for alignment before copying it to userland. Additionally there are two padding bytes in each instance of struct rfcomm_dev_info. The ioctl() that for disclosure...
static int rtp_packetize_ac3( sout_stream_id_sys_t *id, block_t *in ) { int i_max = rtp_mtu (id) - 2; /* payload max in one packet */ int i_count = ( in->i_buffer + i_max - 1 ) / i_max; uint8_t *p_data = in->p_buffer; int i_data = in->i_buffer; int i; for( i = 0; i < i_count...
0
[ "CWE-119", "CWE-787" ]
vlc
204291467724867b79735c0ee3aeb0dbc2200f97
33,328,082,490,748,135,000,000,000,000,000,000,000
35
stream_out: rtp: don't use VLA for user controlled data It should fix a possible invalid memory access When streaming ogg-files via rtp, an ogg-file can trigger an invalid write access using an overly long 'configuration' string. The original code attemps to allocate space to hold the string on the stack and hence, ...
static int vsad16_c(/*MpegEncContext*/ void *c, uint8_t *s1, uint8_t *s2, int stride, int h){ int score=0; int x,y; for(y=1; y<h; y++){ for(x=0; x<16; x++){ score+= FFABS(s1[x ] - s2[x ] - s1[x +stride] + s2[x +stride]); } s1+= stride; s2+= stride; } r...
0
[ "CWE-703", "CWE-189" ]
FFmpeg
454a11a1c9c686c78aa97954306fb63453299760
232,820,126,958,415,660,000,000,000,000,000,000,000
14
avcodec/dsputil: fix signedness in sizeof() comparissions Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static inline void sanitize_value(unsigned flags, char *str, size_t len, zval *zv, zend_bool rfc5987 TSRMLS_DC) { char *language = NULL; zend_bool latin1 = 0; zval_dtor(zv); php_trim(str, len, NULL, 0, zv, 3 TSRMLS_CC); if (rfc5987) { sanitize_rfc5987(zv, &language, &latin1 TSRMLS_CC); } if (flags & PHP_HTT...
0
[ "CWE-399", "CWE-704" ]
ext-http
17137d4ab1ce81a2cee0fae842340a344ef3da83
156,949,809,147,870,710,000,000,000,000,000,000,000
34
fix bug #73055
STACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a) { return a->extensions; }
0
[]
openssl
c7235be6e36c4bef84594aa3b2f0561db84b63d8
106,579,404,840,625,400,000,000,000,000,000,000,000
4
RFC 3161 compliant time stamp request creation, response generation and response verification. Submitted by: Zoltan Glozik <zglozik@opentsa.org> Reviewed by: Ulf Moeller
void CLASS ppm_thumb() { char *thumb; thumb_length = thumb_width*thumb_height*3; thumb = (char *) malloc (thumb_length); merror (thumb, "ppm_thumb()"); fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); fread (thumb, 1, thumb_length, ifp); fwrite (thumb, 1, thumb_length, ofp); free (thumb); ...
0
[ "CWE-703" ]
LibRaw
11909cc59e712e09b508dda729b99aeaac2b29ad
136,945,857,223,938,220,000,000,000,000,000,000,000
11
cumulated data checks patch
void kvm_arch_destroy_vm(struct kvm *kvm) { u16 rc, rrc; kvm_free_vcpus(kvm); sca_dispose(kvm); kvm_s390_gisa_destroy(kvm); /* * We are already at the end of life and kvm->lock is not taken. * This is ok as the file descriptor is closed by now and nobody * can mess with the pv state. To avoid lockdep_assert...
0
[ "CWE-416" ]
linux
0774a964ef561b7170d8d1b1bfe6f88002b6d219
339,254,810,616,483,160,000,000,000,000,000,000,000
24
KVM: Fix out of range accesses to memslots Reset the LRU slot if it becomes invalid when deleting a memslot to fix an out-of-bounds/use-after-free access when searching through memslots. Explicitly check for there being no used slots in search_memslots(), and in the caller of s390's approximation variant. Fixes: 369...
enum Type type() const { return DATE_ITEM; }
0
[ "CWE-617" ]
server
2e7891080667c59ac80f788eef4d59d447595772
149,726,737,320,798,620,000,000,000,000,000,000,000
1
MDEV-25635 Assertion failure when pushing from HAVING into WHERE of view This bug could manifest itself after pushing a where condition over a mergeable derived table / view / CTE DT into a grouping view / derived table / CTE V whose item list contained set functions with constant arguments such as MIN(2), SUM(1) etc....
void Compute(OpKernelContext* ctx) override { const Tensor& arr_t = ctx->input(0); const Tensor& size_tensor = ctx->input(1); OP_REQUIRES(ctx, size_tensor.dims() == 0, errors::InvalidArgument("Shape must be rank 0 but is rank ", size_tensor.dims()));...
0
[ "CWE-125" ]
tensorflow
f410212e373eb2aec4c9e60bf3702eba99a38aba
81,749,400,361,306,450,000,000,000,000,000,000,000
22
Prevent out-of-bound accesses in SparseBincount. PiperOrigin-RevId: 399918616 Change-Id: I11d154f4444d3fde1f09c5c40628b8671791a30d
DECLAREcpFunc(cpSeparateTiles2ContigStrips) { return cpImage(in, out, readSeparateTilesIntoBuffer, writeBufferToContigStrips, imagelength, imagewidth, spp); }
0
[ "CWE-190" ]
libtiff
43c0b81a818640429317c80fea1e66771e85024b
294,834,256,684,980,900,000,000,000,000,000,000,000
7
* tools/tiffcp.c: fix read of undefined variable in case of missing required tags. Found on test case of MSVR 35100. * tools/tiffcrop.c: fix read of undefined buffer in readContigStripsIntoBuffer() due to uint16 overflow. Probably not a security issue but I can be wrong. Reported as MSVR 35100 by Axel Souchet from the ...
static void svm_set_vintr(struct vcpu_svm *svm) { set_intercept(svm, INTERCEPT_VINTR); }
0
[]
kvm
854e8bb1aa06c578c2c9145fa6bfe3680ef63b23
225,583,001,781,914,140,000,000,000,000,000,000,000
4
KVM: x86: Check non-canonical addresses upon WRMSR Upon WRMSR, the CPU should inject #GP if a non-canonical value (address) is written to certain MSRs. The behavior is "almost" identical for AMD and Intel (ignoring MSRs that are not implemented in either architecture since they would anyhow #GP). However, IA32_SYSENTE...
char *FLTGetIsLikeComparisonExpression(FilterEncodingNode *psFilterNode) { const size_t bufferSize = 1024; char szBuffer[1024]; char szTmp[256]; char *pszValue = NULL; const char *pszWild = NULL; const char *pszSingle = NULL; const char *pszEscape = NULL; int bCaseInsensitive = 0; int nLength=0, i=...
1
[ "CWE-200", "CWE-119" ]
mapserver
e52a436c0e1c5e9f7ef13428dba83194a800f4df
317,329,405,400,819,970,000,000,000,000,000,000,000
96
security fix (patch by EvenR)
uint32_t CompactProtocolWriter::writeFieldEnd() { return 0; }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
83,917,636,222,454,910,000,000,000,000,000,000,000
3
Better handling of truncated data when reading strings Summary: Currently we read string size and blindly pre-allocate it. This allows malicious attacker to send a few bytes message and cause server to allocate huge amount of memory (>1GB). This diff changes the logic to check if we have enough data in the buffer bef...
table_border_width(struct table *t) { switch (t->border_mode) { case BORDER_THIN: case BORDER_THICK: return t->maxcol * t->cellspacing + 2 * (RULE_WIDTH + t->cellpadding); case BORDER_NOWIN: case BORDER_NONE: return t->maxcol * t->cellspacing; default: /* not reached */ return 0; } }
0
[ "CWE-119" ]
w3m
67a3db378f5ee3047c158eae4342f7e3245a2ab1
303,583,074,882,371,100,000,000,000,000,000,000,000
14
Fix table rowspan and colspan Origin: https://github.com/tats/w3m/pull/19 Bug-Debian: https://github.com/tats/w3m/issues/8
static int xfrm_dump_sa(struct sk_buff *skb, struct netlink_callback *cb) { struct net *net = sock_net(skb->sk); struct xfrm_state_walk *walk = (struct xfrm_state_walk *) &cb->args[1]; struct xfrm_dump_info info; BUILD_BUG_ON(sizeof(struct xfrm_state_walk) > sizeof(cb->args) - sizeof(cb->args[0])); info.i...
0
[ "CWE-416", "CWE-284" ]
linux
1137b5e2529a8f5ca8ee709288ecba3e68044df2
80,835,052,785,748,200,000,000,000,000,000,000,000
43
ipsec: Fix aborted xfrm policy dump crash An independent security researcher, Mohamed Ghannam, has reported this vulnerability to Beyond Security's SecuriTeam Secure Disclosure program. The xfrm_dump_policy_done function expects xfrm_dump_policy to have been called at least once or it will crash. This can be trigger...
bool LEX::sp_for_loop_cursor_declarations(THD *thd, Lex_for_loop_st *loop, const LEX_CSTRING *index, const Lex_for_loop_bounds_st &bounds) { Item *item= bounds.m_index->get_item(); Item_splo...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
327,699,566,342,588,560,000,000,000,000,000,000,000
62
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
static void cil_reset_typeattributeset(struct cil_typeattributeset *tas) { cil_list_destroy(&tas->datum_expr, CIL_FALSE); }
0
[ "CWE-416" ]
selinux
f34d3d30c8325e4847a6b696fe7a3936a8a361f3
38,464,257,627,941,434,000,000,000,000,000,000,000
4
libsepol/cil: Destroy classperms list when resetting classpermission Nicolas Iooss reports: A few months ago, OSS-Fuzz found a crash in the CIL compiler, which got reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=28648 (the title is misleading, or is caused by another issue that conflicts with...
const wchar_t* _cmsMLUgetWide(const cmsMLU* mlu, cmsUInt32Number *len, cmsUInt16Number LanguageCode, cmsUInt16Number CountryCode, cmsUInt16Number* UsedLanguageCode, cmsUInt16Number* UsedCountryCode) { int i; int Best = -1;...
0
[ "CWE-703" ]
Little-CMS
91c2db7f2559be504211b283bc3a2c631d6f06d9
221,613,550,667,248,550,000,000,000,000,000,000,000
46
Non happy-path fixes
TEST_F(DocumentSourceMatchTest, ShouldAddCorrectDependenciesForClausesWithInternalSchemaXor) { auto query = fromjson("{$_internalSchemaXor: [{a: 1}, {b: 1}, {c: 1}]}"); auto match = DocumentSourceMatch::create(query, getExpCtx()); DepsTracker dependencies; ASSERT_EQUALS(DepsTracker::State::SEE_NEXT, mat...
0
[]
mongo
b3107d73a2c58d7e016b834dae0acfd01c0db8d7
314,150,004,245,986,440,000,000,000,000,000,000,000
12
SERVER-59299: Flatten top-level nested $match stages in doOptimizeAt (cherry picked from commit 4db5eceda2cff697f35c84cd08232bac8c33beec)
do_ctrl(char c) { if (tek_mode) { tek_ctrl(c); return true; } switch (c) { when '\e': /* ESC: Escape */ term.state = ESCAPE; term.esc_mod = 0; when '\a': /* BEL: Bell */ write_bell(); when '\b': /* BS: Back space */ write_backspace(); when '\t': /* HT: ...
0
[ "CWE-703", "CWE-770" ]
mintty
bd52109993440b6996760aaccb66e68e782762b9
317,914,769,173,726,800,000,000,000,000,000,000,000
52
tame some window operations, just in case
create_readwrite_async_thread (GTask *task, gpointer object, gpointer task_data, GCancellable *cancellable) { GFileCreateFlags *data = task_data; GFileIOStream *stream; GError *error = NULL; stream = g...
0
[ "CWE-362" ]
glib
d8f8f4d637ce43f8699ba94c9b7648beda0ca174
106,728,462,660,509,420,000,000,000,000,000,000,000
16
gfile: Limit access to files when copying file_copy_fallback creates new files with default permissions and set the correct permissions after the operation is finished. This might cause that the files can be accessible by more users during the operation than expected. Use G_FILE_CREATE_PRIVATE for the new files to lim...
static _INLINE_ unsigned int serial_in(struct mp_port *mtpt, int offset) { return inb(mtpt->port.iobase + offset); }
0
[ "CWE-200" ]
linux
a8b33654b1e3b0c74d4a1fed041c9aae50b3c427
29,813,725,082,456,510,000,000,000,000,000,000,000
4
Staging: sb105x: info leak in mp_get_count() The icount.reserved[] array isn't initialized so it leaks stack information to userspace. Reported-by: Nico Golde <nico@ngolde.de> Reported-by: Fabian Yamaguchi <fabs@goesec.de> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Cc: stable@kernel.org Signed-off-by: Li...
static int check_dane_issuer(X509_STORE_CTX *ctx, int depth) { struct dane_st *dane = (struct dane_st *)ctx->dane; int matched = 0; X509 *cert; if (!DANETLS_HAS_TA(dane) || depth == 0) return X509_TRUST_UNTRUSTED; /* * Record any DANE trust anchor matches, for the first depth to test...
0
[]
openssl
33cc5dde478ba5ad79f8fd4acd8737f0e60e236e
200,405,997,486,568,000,000,000,000,000,000,000,000
24
Compat self-signed trust with reject-only aux data When auxiliary data contains only reject entries, continue to trust self-signed objects just as when no auxiliary data is present. This makes it possible to reject specific uses without changing what's accepted (and thus overring the underlying EKU). Added new suppo...
static int em_jmp_far(struct x86_emulate_ctxt *ctxt) { int rc; unsigned short sel, old_sel; struct desc_struct old_desc, new_desc; const struct x86_emulate_ops *ops = ctxt->ops; u8 cpl = ctxt->ops->cpl(ctxt); /* Assignment of RIP may only fail in 64-bit mode */ if (ctxt->mode == X86EMUL_MODE_PROT64) ops->get_...
0
[]
kvm
d1442d85cc30ea75f7d399474ca738e0bc96f715
137,337,381,368,858,080,000,000,000,000,000,000,000
29
KVM: x86: Handle errors when RIP is set during far jumps Far jmp/call/ret may fault while loading a new RIP. Currently KVM does not handle this case, and may result in failed vm-entry once the assignment is done. The tricky part of doing so is that loading the new CS affects the VMCS/VMCB state, so if we fail during...
Attribute ConvertSingleElementAttrToFloatAttr(Attribute attr) { const auto dense_fp_attr = attr.dyn_cast_or_null<DenseFPElementsAttr>(); if (dense_fp_attr) { // Already float => return return dense_fp_attr; } OpBuilder builder(attr.getContext()); const auto dense_int_attr = attr.dyn_cast<DenseIntEle...
0
[ "CWE-476", "CWE-125" ]
tensorflow
d6b57f461b39fd1aa8c1b870f1b974aac3554955
244,267,535,761,669,580,000,000,000,000,000,000,000
26
Prevent nullptr dereference in MLIR TFLite dialect/optimizer. PiperOrigin-RevId: 387220762 Change-Id: Id136ef04bb3d36123b4685d316ae81a9ec924d6b