func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
HIDDEN int annotate_msg_cleanup(struct mailbox *mailbox, unsigned int uid) { char key[MAX_MAILBOX_PATH+1]; size_t keylen; int r = 0; annotate_db_t *d = NULL; assert(uid); r = _annotate_getdb(mailbox->name, uid, 0, &d); if (r) return r; /* must be in a transaction to modify the db */ ...
0
[ "CWE-732" ]
cyrus-imapd
621f9e41465b521399f691c241181300fab55995
10,672,985,992,436,650,000,000,000,000,000,000,000
27
annotate: don't allow everyone to write shared server entries
CImg<Tfloat> get_invert(const bool use_LU=true) const { return CImg<Tfloat>(*this,false).invert(use_LU); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
35,761,203,992,529,794,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.
_gdm_display_set_allow_timed_login (GdmDisplay *self, gboolean allow_timed_login) { GdmDisplayPrivate *priv; priv = gdm_display_get_instance_private (self); g_debug ("GdmDisplay: allow timed login: %s", allow_timed_login? "yes" : "no"); pri...
0
[ "CWE-754" ]
gdm
4e6e5335d29c039bed820c43bfd1c19cb62539ff
307,068,843,122,988,730,000,000,000,000,000,000,000
9
display: Use autoptr to handle errors in look for existing users It will make things just cleaner
feedbackFdBecameReadable(ev::io &watcher, int revents) { /* This event indicates that the watchdog has been killed. * In this case we'll kill all descendant * processes and exit. There's no point in keeping this agent * running because we can't detect when the web server exits, * and because this agent doesn't...
0
[ "CWE-59" ]
passenger
9dda49f4a3ebe9bafc48da1bd45799f30ce19566
269,552,084,671,912,600,000,000,000,000,000,000,000
13
Fixed a problem with graceful web server restarts. This problem was introduced in 4.0.6 during the attempt to fix issue #910.
static const char* tcp_host_get_filter_type(hostlist_talker_t* host, conv_filter_type_e filter) { if (filter == CONV_FT_SRC_PORT) return "tcp.srcport"; if (filter == CONV_FT_DST_PORT) return "tcp.dstport"; if (filter == CONV_FT_ANY_PORT) return "tcp.port"; if(!host) { ...
0
[ "CWE-354" ]
wireshark
7f3fe6164a68b76d9988c4253b24d43f498f1753
295,408,127,211,546,080,000,000,000,000,000,000,000
38
TCP: do not use an unknown status when the checksum is 0xffff Otherwise it triggers an assert when adding the column as the field is defined as BASE_NONE and not BASE_DEC or BASE_HEX. Thus an unknown value (not in proto_checksum_vals[)array) cannot be represented. Mark the checksum as bad even if we process the packet...
int tcp_v4_conn_request(struct sock *sk, struct sk_buff *skb) { struct tcp_extend_values tmp_ext; struct tcp_options_received tmp_opt; u8 *hash_location; struct request_sock *req; struct inet_request_sock *ireq; struct tcp_sock *tp = tcp_sk(sk); struct dst_entry *dst = NULL; __be32 saddr = ip_hdr(skb)->saddr; ...
0
[ "CWE-362" ]
linux-2.6
f6d8bd051c391c1c0458a30b2a7abcd939329259
90,066,139,560,618,950,000,000,000,000,000,000,000
177
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...
void rtmsg_ifinfo(int type, struct net_device *dev, unsigned int change, gfp_t flags) { struct net *net = dev_net(dev); struct sk_buff *skb; int err = -ENOBUFS; size_t if_info_size; skb = nlmsg_new((if_info_size = if_nlmsg_size(dev, 0)), flags); if (skb == NULL) goto errout; err = rtnl_fill_ifinfo(skb, d...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
73,143,970,974,833,460,000,000,000,000,000,000,000
25
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
flatpak_dir_revokefs_fuse_unmount (OstreeRepo **repo, GLnxLockFile *lockfile, const gchar *mnt_dir, GError **error) { g_autoptr(GSubprocess) fusermount = NULL; /* Clear references to child_repo as not to leave any...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
252,926,672,352,324,060,000,000,000,000,000,000,000
30
dir: Pass environment via bwrap --setenv when running apply_extra This means we can systematically pass the environment variables through bwrap(1), even if it is setuid and thus is filtering out security-sensitive environment variables. bwrap ends up being run with an empty environment instead. As with the previous c...
inline void AndPredicate::accept(Visitor &v) { v.visit(*this); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
80,083,930,622,990,755,000,000,000,000,000,000,000
1
Fix #122
u_undoline(void) { colnr_T t; char_u *oldp; if (undo_off) return; if (curbuf->b_u_line_ptr == NULL || curbuf->b_u_line_lnum > curbuf->b_ml.ml_line_count) { beep_flush(); return; } /* first save the line for the 'u' command */ if (u_savecommon(curbuf->b_u_line_lnum - 1, ...
0
[ "CWE-190" ]
vim
3eb1637b1bba19519885dd6d377bd5596e91d22c
187,711,683,621,424,140,000,000,000,000,000,000,000
37
patch 8.0.0377: possible overflow when reading corrupted undo file Problem: Possible overflow when reading corrupted undo file. Solution: Check if allocated size is not too big. (King)
ring_buffer_dropped_events_cpu(struct ring_buffer *buffer, int cpu) { struct ring_buffer_per_cpu *cpu_buffer; unsigned long ret; if (!cpumask_test_cpu(cpu, buffer->cpumask)) return 0; cpu_buffer = buffer->buffers[cpu]; ret = local_read(&cpu_buffer->dropped_events); return ret; }
0
[ "CWE-190" ]
linux-stable
59643d1535eb220668692a5359de22545af579f6
68,651,793,307,893,100,000,000,000,000,000,000,000
13
ring-buffer: Prevent overflow of size in ring_buffer_resize() If the size passed to ring_buffer_resize() is greater than MAX_LONG - BUF_PAGE_SIZE then the DIV_ROUND_UP() will return zero. Here's the details: # echo 18014398509481980 > /sys/kernel/debug/tracing/buffer_size_kb tracing_entries_write() processes this...
void SQLiteDBManager::resetPrimary() { auto& self = instance(); WriteLock connection_lock(self.mutex_); self.connection_.reset(); { WriteLock create_lock(self.create_mutex_); sqlite3_close(self.db_); self.db_ = nullptr; } }
0
[ "CWE-77", "CWE-295" ]
osquery
c3f9a3dae22d43ed3b4f6a403cbf89da4cba7c3c
175,643,621,703,179,100,000,000,000,000,000,000,000
12
Merge pull request from GHSA-4g56-2482-x7q8 * Proposed fix for attach tables vulnerability * Add authorizer to ATC tables and cleanups - Add unit test for authorizer function
handle_resize(int rows, int cols, void *user) { term_T *term = (term_T *)user; win_T *wp; term->tl_rows = rows; term->tl_cols = cols; if (term->tl_vterm_size_changed) /* Size was set by vterm_set_size(), don't set the window size. */ term->tl_vterm_size_changed = FALSE; else { FOR_ALL_WI...
0
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
179,351,102,569,866,000,000,000,000,000,000,000,000
24
patch 8.1.0633: crash when out of memory while opening a terminal window Problem: Crash when out of memory while opening a terminal window. Solution: Handle out-of-memory more gracefully.
proxy_C_Verify (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR input, CK_ULONG input_len, CK_BYTE_PTR signature, CK_ULONG signature_len) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_session_to_real (...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
30,807,259,327,520,120,000,000,000,000,000,000,000
16
Check for arithmetic overflows before allocating
static bool e1000_tso_state_needed(void *opaque) { E1000State *s = opaque; return chkflag(TSO); }
0
[ "CWE-835" ]
qemu
1caff0340f49c93d535c6558a5138d20d475315c
179,119,840,979,168,940,000,000,000,000,000,000,000
6
e1000: switch to use qemu_receive_packet() for loopback This patch switches to use qemu_receive_packet() which can detect reentrancy and return early. This is intended to address CVE-2021-3416. Cc: Prasad J Pandit <ppandit@redhat.com> Cc: qemu-stable@nongnu.org Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>...
PackLinuxElf64::canPack() { union { unsigned char buf[sizeof(Elf64_Ehdr) + 14*sizeof(Elf64_Phdr)]; //struct { Elf64_Ehdr ehdr; Elf64_Phdr phdr; } e; } u; COMPILE_TIME_ASSERT(sizeof(u) <= 1024) fi->readx(u.buf, sizeof(u.buf)); fi->seek(0, SEEK_SET); Elf64_Ehdr const *const ehdr =...
0
[]
upx
77c914bce58aab9459029bed699f2bfb7ff2f90f
48,381,134,451,797,670,000,000,000,000,000,000,000
350
Check de-compressed SHT_SYMTAB https://github.com/upx/upx/issues/396 modified: p_lx_elf.cpp
static void lsi_do_dma(LSIState *s, int out) { uint32_t count; dma_addr_t addr; SCSIDevice *dev; assert(s->current); if (!s->current->dma_len) { /* Wait until data is available. */ trace_lsi_do_dma_unavailable(); return; } dev = s->current->req->dev; assert(dev...
0
[ "CWE-835" ]
qemu
de594e47659029316bbf9391efb79da0a1a08e08
149,089,790,258,039,220,000,000,000,000,000,000,000
51
scsi: lsi: exit infinite loop while executing script (CVE-2019-12068) When executing script in lsi_execute_script(), the LSI scsi adapter emulator advances 's->dsp' index to read next opcode. This can lead to an infinite loop if the next opcode is empty. Move the existing loop exit after 10k iterations so that it cove...
static void get_base_point(DBBox *bbox, int alignment, double *bx, double *by) { const int halign = alignment & 3; const int valign = alignment & 12; if (bx) switch (halign) { case HALIGN_LEFT: *bx = bbox->xMin; break; case HALIGN_CENTER: *bx = (bb...
0
[ "CWE-125" ]
libass
f4f48950788b91c6a30029cc28a240b834713ea7
239,514,962,267,678,600,000,000,000,000,000,000,000
29
Fix line wrapping mode 0/3 bugs This fixes two separate bugs: a) Don't move a linebreak into the first symbol. This results in a empty line at the front, which does not help to equalize line lengths at all. Instead, merge line with the second one. b) When moving a linebreak into a symbol that already is a break...
static int tun_attach_filter(struct tun_struct *tun) { int i, ret = 0; struct tun_file *tfile; for (i = 0; i < tun->numqueues; i++) { tfile = rtnl_dereference(tun->tfiles[i]); lock_sock(tfile->socket.sk); ret = sk_attach_filter(&tun->fprog, tfile->socket.sk); release_sock(tfile->socket.sk); if (ret) { ...
0
[ "CWE-476" ]
linux
0ad646c81b2182f7fa67ec0c8c825e0ee165696d
42,592,772,279,832,160,000,000,000,000,000,000,000
19
tun: call dev_get_valid_name() before register_netdevice() register_netdevice() could fail early when we have an invalid dev name, in which case ->ndo_uninit() is not called. For tun device, this is a problem because a timer etc. are already initialized and it expects ->ndo_uninit() to clean them up. We could move th...
static inline napi_status set_error_code(napi_env env, v8::Local<v8::Value> error, napi_value code, const char* code_cstring) { if ((code != nullptr) || (code_cstring != nullptr)) { v8::Local...
0
[ "CWE-191" ]
node
656260b4b65fec3b10f6da3fdc9f11fb941aafb5
167,918,335,872,096,920,000,000,000,000,000,000,000
26
napi: fix memory corruption vulnerability Fixes: https://hackerone.com/reports/784186 CVE-ID: CVE-2020-8174 PR-URL: https://github.com/nodejs-private/node-private/pull/195 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Michael Dawson <michael_da...
static llparse_state_t llhttp__internal__run( llhttp__internal_t* state, const unsigned char* p, const unsigned char* endp) { int match; switch ((llparse_state_t) (intptr_t) state->_current) { case s_n_llhttp__internal__n_closed: s_n_llhttp__internal__n_closed: { if (p == endp) { r...
1
[ "CWE-444" ]
node
da0fda0fe81d372e24c0cb11aec37534985708dd
316,237,170,772,859,280,000,000,000,000,000,000,000
5,951
http: stricter Transfer-Encoding and header separator parsing Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> PR-URL: #315 Backport-PR-URL: #327 CVE-ID: CVE-2022-3221...
static int may_wait_transaction(struct btrfs_root *root, int type) { if (root->fs_info->log_root_recovering) return 0; if (type == TRANS_USERSPACE) return 1; if (type == TRANS_START && !atomic_read(&root->fs_info->open_ioctl_trans)) return 1; return 0; }
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
307,393,368,254,065,600,000,000,000,000,000,000,000
14
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
Returns the maximum supported key size of the algorithm */ PHP_FUNCTION(mcrypt_module_get_algo_key_size) { MCRYPT_GET_MODE_DIR_ARGS(algorithms_dir); RETURN_LONG(mcrypt_module_get_algo_key_size(module, dir));
0
[ "CWE-190" ]
php-src
6c5211a0cef0cc2854eaa387e0eb036e012904d0
149,944,493,055,482,760,000,000,000,000,000,000,000
6
Fix bug #72455: Heap Overflow due to integer overflows
static int __init hmac_module_init(void) { return crypto_register_template(&hmac_tmpl); }
0
[ "CWE-787" ]
linux
af3ff8045bbf3e32f1a448542e73abb4c8ceb6f1
79,561,434,967,807,510,000,000,000,000,000,000,000
4
crypto: hmac - require that the underlying hash algorithm is unkeyed Because the HMAC template didn't check that its underlying hash algorithm is unkeyed, trying to use "hmac(hmac(sha3-512-generic))" through AF_ALG or through KEYCTL_DH_COMPUTE resulted in the inner HMAC being used without having been keyed, resulting ...
#endif static inline bool is_journalled_quota(struct f2fs_sb_info *sbi) { #ifdef CONFIG_QUOTA if (f2fs_sb_has_quota_ino(sbi)) return true; if (F2FS_OPTION(sbi).s_qf_names[USRQUOTA] || F2FS_OPTION(sbi).s_qf_names[GRPQUOTA] || F2FS_OPTION(sbi).s_qf_names[PRJQUOTA]) return true; #endif
0
[ "CWE-476" ]
linux
4969c06a0d83c9c3dc50b8efcdc8eeedfce896f6
329,656,846,088,711,560,000,000,000,000,000,000,000
12
f2fs: support swap file w/ DIO Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
static int context_init(H264Context *h) { ERContext *er = &h->er; int mb_array_size = h->mb_height * h->mb_stride; int y_size = (2 * h->mb_width + 1) * (2 * h->mb_height + 1); int c_size = h->mb_stride * (h->mb_height + 1); int yc_size = y_size + 2 * c_size; int x, y, i; FF_ALLOCZ_OR_GO...
0
[ "CWE-703" ]
FFmpeg
29ffeef5e73b8f41ff3a3f2242d356759c66f91f
227,076,210,276,186,000,000,000,000,000,000,000,000
68
avcodec/h264: do not trust last_pic_droppable when marking pictures as done This simplifies the code and fixes a deadlock Fixes Ticket2927 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
static void WriteProfile(j_compress_ptr jpeg_info,Image *image) { const char *name; const StringInfo *profile; MagickBooleanType iptc; register ssize_t i; size_t length, tag_length; StringInfo *custom_profile; /* Save image profile as a APP marker. */ iptc=MagickF...
1
[ "CWE-119", "CWE-787" ]
ImageMagick
13267a10845a8dadabed63072b537f050cec6daa
141,705,510,825,608,720,000,000,000,000,000,000,000
121
Changed the JPEG writer to raise a warning when the exif profile exceeds 65533 bytes and truncate it.
static int decode_atari_image_16(deark *c, struct atari_img_decode_data *adata) { i64 i, j; i64 rowspan; u32 v; rowspan = adata->w * 2; for(j=0; j<adata->h; j++) { for(i=0; i<adata->w; i++) { v = (u32)dbuf_getu16be(adata->unc_pixels, j*rowspan + 2*i); v = de_rgb565_to_888(v); de_bitmap_setpixel_rgb(ad...
0
[ "CWE-369" ]
deark
62acb7753b0e3c0d3ab3c15057b0a65222313334
11,301,183,140,602,984,000,000,000,000,000,000,000
17
pict,macrsrc: Fixed a bug that could cause division by 0 Found by F. Çelik.
static void exif_iif_add_value(image_info_type *image_info, int section_index, char *name, int tag, int format, int length, void* value, int motorola_intel TSRMLS_DC) { size_t idex; void *vptr; image_info_value *info_value; image_info_data *info_data; image_info_data *list; if (length < 0) { return; } lis...
0
[ "CWE-125" ]
php-src
b4e4788c4461449b4587e19ef1f474ce938e4980
181,078,465,065,530,500,000,000,000,000,000,000,000
127
Fix #76130: Heap Buffer Overflow (READ: 1786) in exif_iif_add_value The MakerNote is not necessarily null-terminated, so we must not use `strlen()` to avoid OOB reads. Instead `php_strnlen()` is the proper way to handle this.
static MagickBooleanType ReadPSDChannelRLE(Image *image,const PSDInfo *psd_info, const ssize_t type,MagickOffsetType *sizes,ExceptionInfo *exception) { MagickBooleanType status; size_t length, row_size; ssize_t count, y; unsigned char *compact_pixels, *pixels; if (image->debu...
0
[ "CWE-787" ]
ImageMagick
d4ec73f866a7c42a2e7f301fcd696e5cb7a7d3ab
230,857,323,475,427,900,000,000,000,000,000,000,000
73
https://github.com/ImageMagick/ImageMagick/issues/350
void edns_opt_list_free(struct edns_option* list) { struct edns_option* n; while(list) { free(list->opt_data); n = list->next; free(list); list = n; } }
0
[ "CWE-787" ]
unbound
6c3a0b54ed8ace93d5b5ca7b8078dc87e75cd640
9,417,842,096,440,295,000,000,000,000,000,000,000
10
- Fix Out of Bound Write Compressed Names in rdata_copy(), reported by X41 D-Sec.
int tc_classify(struct sk_buff *skb, const struct tcf_proto *tp, struct tcf_result *res) { int err = 0; #ifdef CONFIG_NET_CLS_ACT const struct tcf_proto *otp = tp; reclassify: #endif err = tc_classify_compat(skb, tp, res); #ifdef CONFIG_NET_CLS_ACT if (err == TC_ACT_RECLASSIFY) { u32 verd = G_TC_VERD(skb->tc_v...
0
[ "CWE-264" ]
net
90f62cf30a78721641e08737bda787552428061e
246,732,052,027,041,660,000,000,000,000,000,000,000
28
net: Use netlink_ns_capable to verify the permisions of netlink messages It is possible by passing a netlink socket to a more privileged executable and then to fool that executable into writing to the socket data that happens to be valid netlink message to do something that privileged executable did not intend to do. ...
static inline void alter_cred_subscribers(const struct cred *_cred, int n) { #ifdef CONFIG_DEBUG_CREDENTIALS struct cred *cred = (struct cred *) _cred; atomic_add(n, &cred->subscribers); #endif }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
42,910,411,622,851,260,000,000,000,000,000,000,000
8
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...
int gg_send_message_richtext(struct gg_session *sess, int msgclass, uin_t recipient, const unsigned char *message, const unsigned char *format, int formatlen) { gg_debug_session(sess, GG_DEBUG_FUNCTION, "** gg_send_message_richtext(%p, %d, %u, %p, %p, %d);\n", sess, msgclass, recipient, message, format, formatlen); ...
0
[ "CWE-310" ]
libgadu
23644f1fb8219031b3cac93289a588b05f90226b
156,872,670,866,146,670,000,000,000,000,000,000,000
6
Poprawka ograniczania długości opisu.
static void rnd_nonce_func(void *_ctx, size_t length, uint8_t * data) { (void)_ctx; gnutls_rnd(GNUTLS_RND_NONCE, data, length); }
0
[ "CWE-787" ]
rhonabwy
b4c2923a1ba4fabf9b55a89244127e153a3e549b
60,358,431,540,766,510,000,000,000,000,000,000,000
5
Fix buffer overflow on r_jwe_aesgcm_key_unwrap
TfLiteRegistration* Register_FILL() { static TfLiteRegistration r = {/*init=*/nullptr, /*free=*/nullptr, fill::Prepare, fill::Eval}; return &r; }
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
204,067,755,066,547,870,000,000,000,000,000,000,000
5
[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...
static void cache_size(struct cacheinfo *this_leaf, struct device_node *np) { const char *propname; int ct_idx; ct_idx = get_cacheinfo_idx(this_leaf->type); propname = cache_type_info[ct_idx].size_prop; of_property_read_u32(np, propname, &this_leaf->size); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
322,009,302,067,612,080,000,000,000,000,000,000,000
10
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
brcmf_cfg80211_escan_handler(struct brcmf_if *ifp, const struct brcmf_event_msg *e, void *data) { struct brcmf_cfg80211_info *cfg = ifp->drvr->config; s32 status; struct brcmf_escan_result_le *escan_result_le; struct brcmf_bss_info_le *bss_info_le; struct brcmf_bss_info_le *bss = NULL; u32 bi_length; str...
0
[ "CWE-119", "CWE-703" ]
linux
ded89912156b1a47d940a0c954c43afbabd0c42c
68,223,961,516,803,780,000,000,000,000,000,000,000
94
brcmfmac: avoid potential stack overflow in brcmf_cfg80211_start_ap() User-space can choose to omit NL80211_ATTR_SSID and only provide raw IE TLV data. When doing so it can provide SSID IE with length exceeding the allowed size. The driver further processes this IE copying it into a local variable without checking the...
static int opnot(RAsm *a, ut8 * data, const Opcode *op) { int l = 0; if(op->operands[0].reg == X86R_UNDEFINED) { return -1; } data[l++] = 0xf7; data[l++] = 0xd0 | op->operands[0].reg; return l; }
0
[ "CWE-125" ]
radare2
66191f780863ea8c66ace4040d0d04a8842e8432
45,476,269,092,296,380,000,000,000,000,000,000,000
12
Fix #12239 - crash in the x86.nz assembler ##asm (#12252)
static NTSTATUS vfswrap_durable_reconnect(struct vfs_handle_struct *handle, struct smb_request *smb1req, struct smbXsrv_open *op, const DATA_BLOB old_cookie, TALLOC_CTX *mem_ctx, struct files_struct **fsp, DATA_BLOB *new_cookie) { return vfs_default_durable_reconnect(handle->c...
0
[ "CWE-665" ]
samba
30e724cbff1ecd90e5a676831902d1e41ec1b347
296,382,490,544,959,160,000,000,000,000,000,000,000
12
FSCTL_GET_SHADOW_COPY_DATA: Initialize output array to zero Otherwise num_volumes and the end marker can return uninitialized data to the client. Signed-off-by: Christof Schmitt <christof.schmitt@us.ibm.com> Reviewed-by: Jeremy Allison <jra@samba.org> Reviewed-by: Simo Sorce <idra@samba.org>
struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt, const char *filename, int flags, umode_t mode) { struct open_flags op; int err = build_open_flags(flags, mode, &op); if (err) return ERR_PTR(err); return do_file_open_root(dentry, mnt, filename, &op); }
0
[ "CWE-284" ]
linux
54d5ca871e72f2bb172ec9323497f01cd5091ec7
61,494,111,148,222,680,000,000,000,000,000,000,000
9
vfs: add vfs_select_inode() helper Signed-off-by: Miklos Szeredi <mszeredi@redhat.com> Cc: <stable@vger.kernel.org> # v4.2+
bfd_signal_init(void) { signal_set(SIGHUP, sigreload_bfd, NULL); signal_set(SIGINT, sigend_bfd, NULL); signal_set(SIGTERM, sigend_bfd, NULL); signal_ignore(SIGPIPE); }
0
[ "CWE-200" ]
keepalived
26c8d6374db33bcfcdcd758b1282f12ceef4b94f
47,285,655,961,162,450,000,000,000,000,000,000,000
7
Disable fopen_safe() append mode by default If a non privileged user creates /tmp/keepalived.log and has it open for read (e.g. tail -f), then even though keepalived will change the owner to root and remove all read/write permissions from non owners, the application which already has the file open will be able to read...
SERVER* cmdline(int argc, char *argv[]) { int i=0; int nonspecial=0; int c; struct option long_options[] = { {"read-only", no_argument, NULL, 'r'}, {"multi-file", no_argument, NULL, 'm'}, {"copy-on-write", no_argument, NULL, 'c'}, {"authorize-file", required_argument, NULL, 'l'}, {"config-file", required_...
0
[ "CWE-119", "CWE-787" ]
nbd
3ef52043861ab16352d49af89e048ba6339d6df8
48,552,085,455,560,520,000,000,000,000,000,000,000
132
Fix buffer size checking Yes, this means we've re-introduced CVE-2005-3534. Sigh.
GF_VVCConfig *gf_isom_vvc_config_get(GF_ISOFile *the_file, u32 trackNumber, u32 DescriptionIndex) { GF_TrackBox *trak; u32 type; GF_MPEGVisualSampleEntryBox *entry; /*todo, add support for subpic track and nvcl tracks*/ trak = gf_isom_get_track_from_file(the_file, trackNumber); if (!trak || !trak->Media || !Descr...
0
[ "CWE-617", "CWE-703" ]
gpac
9ea93a2ec8f555ceed1ee27294cf94822f14f10f
785,326,495,488,926,900,000,000,000,000,000,000
25
fixed #2165
static int macsec_add_rxsa(struct sk_buff *skb, struct genl_info *info) { struct net_device *dev; struct nlattr **attrs = info->attrs; struct macsec_secy *secy; struct macsec_rx_sc *rx_sc; struct macsec_rx_sa *rx_sa; unsigned char assoc_num; struct nlattr *tb_rxsc[MACSEC_RXSC_ATTR_MAX + 1]; struct nlattr *tb_sa...
0
[ "CWE-119" ]
net
5294b83086cc1c35b4efeca03644cf9d12282e5b
262,727,946,594,173,400,000,000,000,000,000,000,000
77
macsec: dynamically allocate space for sglist We call skb_cow_data, which is good anyway to ensure we can actually modify the skb as such (another error from prior). Now that we have the number of fragments required, we can safely allocate exactly that amount of memory. Fixes: c09440f7dcb3 ("macsec: introduce IEEE 80...
xfs_bmapi_read( struct xfs_inode *ip, xfs_fileoff_t bno, xfs_filblks_t len, struct xfs_bmbt_irec *mval, int *nmap, int flags) { struct xfs_mount *mp = ip->i_mount; struct xfs_ifork *ifp; struct xfs_bmbt_irec got; xfs_fileoff_t obno; xfs_fileoff_t end; struct xfs_iext_cursor icur; int error; bool...
0
[]
linux
2c4306f719b083d17df2963bc761777576b8ad1b
237,248,724,110,655,600,000,000,000,000,000,000,000
93
xfs: set format back to extents if xfs_bmap_extents_to_btree If xfs_bmap_extents_to_btree fails in a mode where we call xfs_iroot_realloc(-1) to de-allocate the root, set the format back to extents. Otherwise we can assume we can dereference ifp->if_broot based on the XFS_DINODE_FMT_BTREE format, and crash. Bugzilla...
Item *Item_cond_or::neg_transformer(THD *thd) /* NOT(a OR b OR ...) -> */ /* NOT a AND NOT b AND ... */ { neg_arguments(thd); Item *item= new (thd->mem_root) Item_cond_and(thd, list); return item; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
48,592,294,528,027,640,000,000,000,000,000,000,000
7
MDEV-26402: A SEGV in Item_field::used_tables/update_depend_map_for_order... When doing condition pushdown from HAVING into WHERE, Item_equal::create_pushable_equalities() calls item->set_extraction_flag(IMMUTABLE_FL) for constant items. Then, Item::cleanup_excluding_immutables_processor() checks for this flag to see ...
save_search_patterns(void) { if (save_level++ == 0) { saved_spats[0] = spats[0]; if (spats[0].pat != NULL) saved_spats[0].pat = vim_strsave(spats[0].pat); saved_spats[1] = spats[1]; if (spats[1].pat != NULL) saved_spats[1].pat = vim_strsave(spats[1].pat); if (mr_pattern == NULL) saved_mr_pat...
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
335,331,147,652,294,030,000,000,000,000,000,000,000
20
patch 8.2.5050: using freed memory when searching for pattern in path Problem: Using freed memory when searching for pattern in path. Solution: Make a copy of the line.
static inline bool return_type_analysis_context_unresolved(struct ReturnTypeAnalysisCtx *ctx) { return !ctx->resolved && ctx->ret_type && ctx->ret_reg; }
0
[ "CWE-703" ]
rizin
6ce71d8aa3dafe3cdb52d5d72ae8f4b95916f939
188,575,543,253,605,630,000,000,000,000,000,000,000
3
Initialize retctx,ctx before freeing the inner elements In rz_core_analysis_type_match retctx structure was initialized on the stack only after a "goto out_function", where a field of that structure was freed. When the goto path is taken, the field is not properly initialized and it cause cause a crash of Rizin or hav...
int dbd_db_disconnect(SV* dbh, imp_dbh_t* imp_dbh) { #ifdef dTHR dTHR; #endif dTHX; D_imp_xxh(dbh); /* We assume that disconnect will always work */ /* since most errors imply already disconnected. */ DBIc_ACTIVE_off(imp_dbh); if (DBIc_TRACE_LEVEL(imp_xxh) >= 2) PerlIO_printf(DBIc_LOGPIO(imp...
0
[ "CWE-125" ]
DBD-mysql
793b72b1a0baa5070adacaac0e12fd995a6fbabe
322,053,828,303,496,300,000,000,000,000,000,000,000
20
Added Pali's fix for CVE-2016-1249
cipher_algo_transform(uint32_t virtio_cipher_algo, enum rte_crypto_cipher_algorithm *algo) { switch (virtio_cipher_algo) { case VIRTIO_CRYPTO_CIPHER_AES_CBC: *algo = RTE_CRYPTO_CIPHER_AES_CBC; break; case VIRTIO_CRYPTO_CIPHER_AES_CTR: *algo = RTE_CRYPTO_CIPHER_AES_CTR; break; case VIRTIO_CRYPTO_CIPHER_DES...
0
[ "CWE-125" ]
dpdk
acd4c92fa693bbea695f2bb42bb93fb8567c3ca5
2,939,536,383,466,825,600,000,000,000,000,000,000
47
vhost/crypto: validate keys lengths transform_cipher_param() and transform_chain_param() handle the payload data for the VHOST_USER_CRYPTO_CREATE_SESS message. These payloads have to be validated, since it could come from untrusted sources. Two buffers and their lengths are defined in this payload, one the the auth k...
static void b43_request_firmware(struct work_struct *work) { struct b43_wl *wl = container_of(work, struct b43_wl, firmware_load); struct b43_wldev *dev = wl->current_dev; struct b43_request_fw_context *ctx; unsigned int i; int err; const char *errmsg; ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); if (!ctx) ...
0
[ "CWE-134" ]
wireless
9538cbaab6e8b8046039b4b2eb6c9d614dc782bd
27,667,599,246,216,020,000,000,000,000,000,000,000
58
b43: stop format string leaking into error msgs The module parameter "fwpostfix" is userspace controllable, unfiltered, and is used to define the firmware filename. b43_do_request_fw() populates ctx->errors[] on error, containing the firmware filename. b43err() parses its arguments as a format string. For systems with...
static void io_async_task_func(struct callback_head *cb) { struct io_kiocb *req = container_of(cb, struct io_kiocb, task_work); struct async_poll *apoll = req->apoll; struct io_ring_ctx *ctx = req->ctx; trace_io_uring_task_run(req->ctx, req->opcode, req->user_data); if (io_poll_rewait(req, &apoll->poll)) { spi...
0
[ "CWE-416" ]
linux
6d816e088c359866f9867057e04f244c608c42fe
269,241,368,234,990,860,000,000,000,000,000,000,000
30
io_uring: hold 'ctx' reference around task_work queue + execute We're holding the request reference, but we need to go one higher to ensure that the ctx remains valid after the request has finished. If the ring is closed with pending task_work inflight, and the given io_kiocb finishes sync during issue, then we need a...
SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, unsigned int, dev) { return do_mknodat(dfd, filename, mode, dev); }
0
[ "CWE-416", "CWE-284" ]
linux
d0cb50185ae942b03c4327be322055d622dc79f6
322,560,447,256,975,340,000,000,000,000,000,000,000
5
do_last(): fetch directory ->i_mode and ->i_uid before it's too late may_create_in_sticky() call is done when we already have dropped the reference to dir. Fixes: 30aba6656f61e (namei: allow restricted O_CREAT of FIFOs and regular files) Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
bool ciEnv::jvmti_state_changed() const { // Some classes were redefined if (_jvmti_redefinition_count != JvmtiExport::redefinition_count()) { return true; } if (!_jvmti_can_access_local_variables && JvmtiExport::can_access_local_variables()) { return true; } if (!_jvmti_can_hotswap_or_post_b...
0
[]
jdk17u
8be0fc09f0ba2dd1dbfd6627456fa929d5574b04
14,125,482,960,926,377,000,000,000,000,000,000,000
33
8281859: Improve class compilation Reviewed-by: mbaesken Backport-of: 3ac62a66efd05d0842076dd4cfbea0e53b12630f
void AppendToFile(const base::FilePath& path, const std::string& content) { base::ScopedBlockingCall scoped_blocking_call(FROM_HERE, base::BlockingType::WILL_BLOCK); DCHECK(!path.empty()); base::AppendToFile(path, content.data(), content.size()); }
0
[ "CWE-200", "CWE-668" ]
electron
07a1c2a3e5845901f7e2eda9506695be58edc73c
290,265,352,808,640,300,000,000,000,000,000,000,000
7
fix: restrict sendToFrame to same-process frames by default (#26875)
xmlFAGenerateCountedEpsilonTransition(xmlRegParserCtxtPtr ctxt, xmlRegStatePtr from, xmlRegStatePtr to, int counter) { if (to == NULL) { to = xmlRegNewState(ctxt); xmlRegStatePush(ctxt, to); ctxt->state = to; } xmlRegStateAddTrans(ctxt, from, NULL, to, counter, -1); }
0
[ "CWE-119" ]
libxml2
cbb271655cadeb8dbb258a64701d9a3a0c4835b4
99,559,110,234,959,230,000,000,000,000,000,000,000
9
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.
monitor_key_compare (gconstpointer a, gconstpointer data) { const Monitor *monitor; const Monitor *compare_monitor; monitor = a; compare_monitor = data; if (monitor->client < compare_monitor->client) { return -1; } if (monitor->client > compare_monitor->cli...
0
[ "CWE-20" ]
nautilus
1630f53481f445ada0a455e9979236d31a8d3bb0
84,657,400,644,361,050,000,000,000,000,000,000,000
29
mime-actions: use file metadata for trusting desktop files Currently we only trust desktop files that have the executable bit set, and don't replace the displayed icon or the displayed name until it's trusted, which prevents for running random programs by a malicious desktop file. However, the executable permission i...
static int kvm_lapic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val) { int ret = 0; trace_kvm_apic_write(reg, val); switch (reg) { case APIC_ID: /* Local APIC ID */ if (!apic_x2apic_mode(apic)) kvm_apic_set_xapic_id(apic, val >> 24); else ret = 1; break; case APIC_TASKPRI: report_tpr_access(a...
0
[ "CWE-476" ]
linux
00b5f37189d24ac3ed46cb7f11742094778c46ce
107,886,136,966,336,550,000,000,000,000,000,000,000
149
KVM: x86: Avoid theoretical NULL pointer dereference in kvm_irq_delivery_to_apic_fast() When kvm_irq_delivery_to_apic_fast() is called with APIC_DEST_SELF shorthand, 'src' must not be NULL. Crash the VM with KVM_BUG_ON() instead of crashing the host. Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Message-Id: <...
void security_sb_clone_mnt_opts(const struct super_block *oldsb, struct super_block *newsb) { security_ops->sb_clone_mnt_opts(oldsb, newsb); }
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
158,103,224,703,786,970,000,000,000,000,000,000,000
5
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...
proxy_C_SignUpdate (CK_X_FUNCTION_LIST *self, CK_SESSION_HANDLE handle, CK_BYTE_PTR part, CK_ULONG part_len) { State *state = (State *)self; Mapping map; CK_RV rv; rv = map_session_to_real (state->px, &handle, &map, NULL); if (rv != CKR_OK) return rv; ...
0
[ "CWE-190" ]
p11-kit
5307a1d21a50cacd06f471a873a018d23ba4b963
144,276,187,741,219,120,000,000,000,000,000,000,000
14
Check for arithmetic overflows before allocating
static int vt_io_fontreset(struct vc_data *vc, struct console_font_op *op) { int ret; if (__is_defined(BROKEN_GRAPHICS_PROGRAMS)) { /* * With BROKEN_GRAPHICS_PROGRAMS defined, the default font is * not saved. */ return -ENOSYS; } op->op = KD_FONT_OP_SET_DEFAULT; op->data = NULL; ret = con_font_op(v...
0
[ "CWE-662" ]
linux
90bfdeef83f1d6c696039b6a917190dcbbad3220
92,349,098,738,946,250,000,000,000,000,000,000,000
24
tty: make FONTX ioctl use the tty pointer they were actually passed Some of the font tty ioctl's always used the current foreground VC for their operations. Don't do that then. This fixes a data race on fg_console. Side note: both Michael Ellerman and Jiri Slaby point out that all these ioctls are deprecated, and s...
uint64_t dup_mig_pages_transferred(void) { return acct_info.dup_pages; }
0
[ "CWE-20" ]
qemu
0be839a2701369f669532ea5884c15bead1c6e08
127,263,292,827,731,900,000,000,000,000,000,000,000
4
migration: fix parameter validation on ram load During migration, the values read from migration stream during ram load are not validated. Especially offset in host_from_stream_offset() and also the length of the writes in the callers of said function. To fix this, we need to make sure that the [offset, offset + leng...
static bool checkout_is_workdir_modified( checkout_data *data, const git_diff_file *baseitem, const git_diff_file *newitem, const git_index_entry *wditem) { git_oid oid; const git_index_entry *ie; /* handle "modified" submodule */ if (wditem->mode == GIT_FILEMODE_COMMIT) { git_submodule *sm; unsigned int s...
0
[ "CWE-20", "CWE-706" ]
libgit2
64c612cc3e25eff5fb02c59ef5a66ba7a14751e4
272,670,652,889,271,360,000,000,000,000,000,000,000
73
Protect against 8.3 "short name" attacks also on Linux/macOS The Windows Subsystem for Linux (WSL) is getting increasingly popular, in particular because it makes it _so_ easy to run Linux software on Windows' files, via the auto-mounted Windows drives (`C:\` is mapped to `/mnt/c/`, no need to set that up manually). ...
static int vmx_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) { unsigned long hw_cr4 = cr4 | (to_vmx(vcpu)->rmode.vm86_active ? KVM_RMODE_VM_CR4_ALWAYS_ON : KVM_PMODE_VM_CR4_ALWAYS_ON); if (cr4 & X86_CR4_VMXE) { /* * To use VMXON (and later other VMX instructions), a guest * must first be able to tu...
0
[ "CWE-20" ]
linux
bfd0a56b90005f8c8a004baf407ad90045c2b11e
254,654,640,955,666,400,000,000,000,000,000,000,000
41
nEPT: Nested INVEPT If we let L1 use EPT, we should probably also support the INVEPT instruction. In our current nested EPT implementation, when L1 changes its EPT table for L2 (i.e., EPT12), L0 modifies the shadow EPT table (EPT02), and in the course of this modification already calls INVEPT. But if last level of sh...
TfLiteStatus Prepare(TfLiteContext* context, TfLiteNode* node) { TF_LITE_ENSURE_EQ(context, NumInputs(node), 3); TF_LITE_ENSURE_EQ(context, NumOutputs(node), 1); const TfLiteTensor* input; TF_LITE_ENSURE_OK(context, GetInputSafe(context, node, kInputTensor, &input)); const TfLiteTensor* begin; TF_LITE_ENSU...
0
[ "CWE-125", "CWE-787" ]
tensorflow
1970c2158b1ffa416d159d03c3370b9a462aee35
180,752,637,665,617,000,000,000,000,000,000,000,000
35
[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...
parser_compilest(PyST_Object *self, PyObject *args, PyObject *kw) { PyObject* res = NULL; PyArena* arena = NULL; mod_ty mod; PyObject* filename = NULL; int ok; static char *keywords[] = {"st", "filename", NULL}; if (self == NULL || PyModule_Check(self)) ok = PyA...
0
[ "CWE-125" ]
cpython
dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c
184,851,806,976,513,840,000,000,000,000,000,000,000
43
bpo-35766: Merge typed_ast back into CPython (GH-11645)
void visitSFDFragment( FILE *sfd, SplineFont *sf, visitSFDFragmentFunc ufunc, void* udata ) { int eof; char tok[2000]; while ( 1 ) { if ( (eof = getname(sfd,tok))!=1 ) { if ( eof==-1 ) break; geteol(sfd,tok); continue; } ufunc( sfd, tok, sf, udata ); } }
0
[ "CWE-416" ]
fontforge
048a91e2682c1a8936ae34dbc7bd70291ec05410
255,744,226,061,221,000,000,000,000,000,000,000,000
16
Fix for #4084 Use-after-free (heap) in the SFD_GetFontMetaData() function Fix for #4086 NULL pointer dereference in the SFDGetSpiros() function Fix for #4088 NULL pointer dereference in the SFD_AssignLookups() function Add empty sf->fontname string if it isn't set, fixing #4089 #4090 and many other potential issues (...
GC_API void GC_CALL GC_debug_register_finalizer_unreachable (void * obj, GC_finalization_proc fn, void * cd, GC_finalization_proc *ofn, void * *ocd) { GC_finalization_proc my_old_fn = OFN_UNSET; void * ...
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
32,736,332,922,948,504,000,000,000,000,000,000,000
28
Fix malloc routines to prevent size value wrap-around See issue #135 on Github. * allchblk.c (GC_allochblk, GC_allochblk_nth): Use OBJ_SZ_TO_BLOCKS_CHECKED instead of OBJ_SZ_TO_BLOCKS. * malloc.c (GC_alloc_large): Likewise. * alloc.c (GC_expand_hp_inner): Type of "bytes" local variable changed from word to size_t; ca...
int user_auth_scheme_module_can_use(struct config_module * config, const char * username, void * cls) { json_t * j_user_id, * j_credential; int ret; j_user_id = get_user_id_from_username(config, (json_t *)cls, username, 0); if (check_result_value(j_user_id, G_OK)) { j_credential = get_credential_list(con...
0
[ "CWE-120", "CWE-787" ]
glewlwyd
0efd112bb62f566877750ad62ee828bff579b4e2
271,970,307,884,505,940,000,000,000,000,000,000,000
25
Fix fido2 signature validation bug
int vcf_write_line(htsFile *fp, kstring_t *line) { int ret; if ( line->s[line->l-1]!='\n' ) kputc('\n',line); if ( fp->format.compression!=no_compression ) ret = bgzf_write(fp->fp.bgzf, line->s, line->l); else ret = hwrite(fp->fp.hfile, line->s, line->l); return ret==line->l ? 0 : -1...
0
[ "CWE-787" ]
htslib
dcd4b7304941a8832fba2d0fc4c1e716e7a4e72c
155,106,523,597,615,800,000,000,000,000,000,000,000
10
Fix check for VCF record size The check for excessive record size in vcf_parse_format() only looked at individual fields. It was therefore possible to exceed the limit and overflow fmt_aux_t::offset by having multiple fields with a combined size that went over INT_MAX. Fix by including the amount of memory used so fa...
pair_encode(float8 x, float8 y, char *str) { int ndig = DBL_DIG + extra_float_digits; if (ndig < 1) ndig = 1; sprintf(str, "%.*g,%.*g", ndig, x, ndig, y); return TRUE; }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
160,976,293,096,215,930,000,000,000,000,000,000,000
10
Predict integer overflow to avoid buffer overruns. Several functions, mostly type input functions, calculated an allocation size such that the calculation wrapped to a small positive value when arguments implied a sufficiently-large requirement. Writes past the end of the inadvertent small allocation followed shortly...
template<typename tp, typename tc, typename to> unsigned int _size_object3dtoCImg3d(const CImgList<tp>& primitives, const CImgList<tc>& colors, const CImg<to>& opacities) const { unsigned int siz = 8U + 3*_width; cimglis...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
186,778,174,314,573,470,000,000,000,000,000,000,000
13
Fix other issues in 'CImg<T>::load_bmp()'.
static int gup_huge_pgd(pgd_t orig, pgd_t *pgdp, unsigned long addr, unsigned long end, int write, struct page **pages, int *nr) { int refs; struct page *head, *page; if (write && !pgd_write(orig)) return 0; refs = 0; head = pgd_page(orig); page = head + ((addr & ~PGDIR_MASK) >> PAGE_SHIFT); do { VM_...
0
[ "CWE-362" ]
linux
19be0eaffa3ac7d8eb6784ad9bdbc7d67ed8e619
316,448,834,739,146,800,000,000,000,000,000,000,000
35
mm: remove gup_flags FOLL_WRITE games from __get_user_pages() This is an ancient bug that was actually attempted to be fixed once (badly) by me eleven years ago in commit 4ceb5db9757a ("Fix get_user_pages() race for write access") but that was then undone due to problems on s390 by commit f33ea7f404e5 ("fix get_user_p...
static RBinSection* _get_vsection_at(RBin *bin, ut64 vaddr) { RBinObject *cur = r_bin_object_get_cur (bin); return r_bin_get_section_at (cur, vaddr, true); }
0
[ "CWE-125" ]
radare2
d31c4d3cbdbe01ea3ded16a584de94149ecd31d9
68,358,292,273,188,630,000,000,000,000,000,000,000
4
Fix #8748 - Fix oobread on string search
static int nf_tables_commit_audit_alloc(struct list_head *adl, struct nft_table *table) { struct nft_audit_data *adp; list_for_each_entry(adp, adl, list) { if (adp->table == table) return 0; } adp = kzalloc(sizeof(*adp), GFP_KERNEL); if (!adp) return -ENOMEM; adp->table = table; list_add(&adp->list,...
0
[ "CWE-665" ]
linux
ad9f151e560b016b6ad3280b48e42fa11e1a5440
165,164,528,434,975,590,000,000,000,000,000,000,000
16
netfilter: nf_tables: initialize set before expression setup nft_set_elem_expr_alloc() needs an initialized set if expression sets on the NFT_EXPR_GC flag. Move set fields initialization before expression setup. [4512935.019450] ================================================================== [4512935.019456] BUG: ...
int gdImageMeanRemoval(gdImagePtr im) { float filter[3][3] = {{-1.0,-1.0,-1.0}, {-1.0,9.0,-1.0}, {-1.0,-1.0,-1.0}}; return gdImageConvolution(im, filter, 1, 0); }
0
[ "CWE-119" ]
php-src
feba44546c27b0158f9ac20e72040a224b918c75
167,349,269,357,262,760,000,000,000,000,000,000,000
8
Fixed bug #22965 (Crash in gd lib's ImageFillToBorder()).
void Http2Session::IncreaseAllocatedSize(size_t size) { current_nghttp2_memory_ += size; }
0
[ "CWE-416" ]
node
a3c33d4ce78f74d1cf1765704af5b427aa3840a6
298,776,820,526,610,200,000,000,000,000,000,000,000
3
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...
static int sqlite3InRhsIsConstant(Expr *pIn){ Expr *pLHS; int res; assert( !ExprHasProperty(pIn, EP_xIsSelect) ); pLHS = pIn->pLeft; pIn->pLeft = 0; res = sqlite3ExprIsConstant(pIn); pIn->pLeft = pLHS; return res; }
0
[ "CWE-476" ]
sqlite
57f7ece78410a8aae86aa4625fb7556897db384c
54,713,688,890,125,080,000,000,000,000,000,000,000
10
Fix a problem that comes up when using generated columns that evaluate to a constant in an index and then making use of that index in a join. FossilOrigin-Name: 8b12e95fec7ce6e0de82a04ca3dfcf1a8e62e233b7382aa28a8a9be6e862b1af
static int ssl_scan_clienthello_tlsext(SSL *s, PACKET *pkt, int *al) { unsigned int type; int renegotiate_seen = 0; PACKET extensions; *al = SSL_AD_DECODE_ERROR; s->servername_done = 0; s->tlsext_status_type = -1; #ifndef OPENSSL_NO_NEXTPROTONEG s->s3->next_proto_neg_seen = 0; #endif O...
0
[ "CWE-20" ]
openssl
4ad93618d26a3ea23d36ad5498ff4f59eff3a4d2
236,206,041,520,761,200,000,000,000,000,000,000,000
428
Don't change the state of the ETM flags until CCS processing Changing the ciphersuite during a renegotiation can result in a crash leading to a DoS attack. ETM has not been implemented in 1.1.0 for DTLS so this is TLS only. The problem is caused by changing the flag indicating whether to use ETM or not immediately on...
abitreader::~abitreader( void ) { }
0
[ "CWE-1187" ]
lepton
82167c144a322cc956da45407f6dce8d4303d346
156,202,804,944,953,140,000,000,000,000,000,000,000
3
fix #87 : always check that threads_required set up the appropriate number of threads---fire off nop functions on unused threads for consistency
bool sp_process_definer(THD *thd) { DBUG_ENTER("sp_process_definer"); LEX *lex= thd->lex; /* If the definer is not specified, this means that CREATE-statement missed DEFINER-clause. DEFINER-clause can be missed in two cases: - The user submitted a statement w/o the clause. This is a normal ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
329,136,019,702,226,700,000,000,000,000,000,000,000
86
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...
_gnutls_proc_cert_client_cert_vrfy (gnutls_session_t session, uint8_t * data, size_t data_size) { int size, ret; ssize_t dsize = data_size; uint8_t *pdata = data; gnutls_datum_t sig; cert_auth_info_t info = _gnutls_get_auth_info (session); gnutls_pcert_st peer_cert; gnu...
0
[ "CWE-399" ]
gnutls
9c62f4feb2bdd6fbbb06eb0c60bfdea80d21bbb8
149,139,938,692,313,480,000,000,000,000,000,000,000
74
Deinitialize the correct number of certificates. Reported by Remi Gacogne.
static int write_eprom_word(pegasus_t *pegasus, __u8 index, __u16 data) { int i; __u8 tmp, d[4] = { 0x3f, 0, 0, EPROM_WRITE }; int ret; __le16 le_data = cpu_to_le16(data); set_registers(pegasus, EpromOffset, 4, d); enable_eprom_write(pegasus); set_register(pegasus, EpromOffset, index); set_registers(pegasus, E...
0
[ "CWE-119", "CWE-284" ]
linux
5593523f968bc86d42a035c6df47d5e0979b5ace
204,878,522,226,425,360,000,000,000,000,000,000,000
30
pegasus: Use heap buffers for all register access Allocating USB buffers on the stack is not portable, and no longer works on x86_64 (with VMAP_STACK enabled as per default). Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") References: https://bugs.debian.org/852556 Reported-by: Lisandro Damián Nicanor Pérez Meyer <lisandro@...
static void __exit drbg_exit(void) { crypto_unregister_rngs(drbg_algs, (ARRAY_SIZE(drbg_cores) * 2)); }
0
[ "CWE-476" ]
linux
8fded5925d0a733c46f8d0b5edd1c9b315882b1d
303,055,710,154,549,760,000,000,000,000,000,000,000
4
crypto: drbg - Convert to new rng interface This patch converts the DRBG implementation to the new low-level rng interface. This allows us to get rid of struct drbg_gen by using the new RNG API instead. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Acked-by: Stephan Mueller <smueller@chronox.de>
int Field_string::store(const char *from, size_t length,CHARSET_INFO *cs) { ASSERT_COLUMN_MARKED_FOR_WRITE_OR_COMPUTED; uint copy_length; int rc; /* See the comment for Field_long::store(long long) */ DBUG_ASSERT(!table || table->in_use == current_thd); rc= well_formed_copy_with_check((char*) ptr, field_l...
0
[ "CWE-416", "CWE-703" ]
server
08c7ab404f69d9c4ca6ca7a9cf7eec74c804f917
199,036,544,834,742,970,000,000,000,000,000,000,000
22
MDEV-24176 Server crashes after insert in the table with virtual column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter...
static int acpi_smbus_hc_add(struct acpi_device *device) { int status; unsigned long long val; struct acpi_smb_hc *hc; if (!device) return -EINVAL; status = acpi_evaluate_integer(device->handle, "_EC", NULL, &val); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "error obtaining _EC.\n"); return -EIO; ...
1
[ "CWE-200" ]
linux
43cdd1b716b26f6af16da4e145b6578f98798bf6
48,854,182,160,491,160,000,000,000,000,000,000,000
35
ACPI: sbshc: remove raw pointer from printk() message There's no need to be printing a raw kernel pointer to the kernel log at every boot. So just remove it, and change the whole message to use the correct dev_info() call at the same time. Reported-by: Wang Qize <wang_qize@venustech.com.cn> Cc: All applicable <stabl...
static long btrfs_ioctl_logical_to_ino(struct btrfs_root *root, void __user *arg) { int ret = 0; int size; struct btrfs_ioctl_logical_ino_args *loi; struct btrfs_data_container *inodes = NULL; struct btrfs_path *path = NULL; if (!capable(CAP_SYS_ADMIN)) return -EPERM; loi = memdup_user(arg, sizeof(*loi)...
0
[ "CWE-310" ]
linux-2.6
9c52057c698fb96f8f07e7a4bcf4801a092bda89
327,706,200,860,534,940,000,000,000,000,000,000,000
52
Btrfs: fix hash overflow handling The handling for directory crc hash overflows was fairly obscure, split_leaf returns EOVERFLOW when we try to extend the item and that is supposed to bubble up to userland. For a while it did so, but along the way we added better handling of errors and forced the FS readonly if we hi...
const CImg<T>& display_object3d(CImgDisplay &disp, const CImg<tp>& vertices, const CImgList<tf>& primitives, const CImgList<tc>& colors, const bool centering=true, ...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
69,093,429,037,615,600,000,000,000,000,000,000,000
16
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
static ssize_t sisusb_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) { struct sisusb_usb_data *sisusb; int errno = 0; ssize_t bytes_written = 0; u8 buf8; u16 buf16; u32 buf32, address; sisusb = file->private_data; if (!sisusb) return -ENODEV; mutex_lock(&sisusb->lock); ...
0
[ "CWE-476" ]
linux
9a5729f68d3a82786aea110b1bfe610be318f80a
187,243,866,749,674,900,000,000,000,000,000,000,000
143
USB: sisusbvga: fix oops in error path of sisusb_probe The pointer used to log a failure of usb_register_dev() must be set before the error is logged. v2: fix that minor is not available before registration Signed-off-by: oliver Neukum <oneukum@suse.com> Reported-by: syzbot+a0cbdbd6d169020c8959@syzkaller.appspotmail...
struct ndpi_detection_module_struct *ndpi_init_detection_module(ndpi_init_prefs prefs) { struct ndpi_detection_module_struct *ndpi_str = ndpi_malloc(sizeof(struct ndpi_detection_module_struct)); int i; if(ndpi_str == NULL) { #ifdef NDPI_ENABLE_DEBUG_MESSAGES NDPI_LOG_ERR(ndpi_str, "ndpi_init_detection_module...
0
[ "CWE-125" ]
nDPI
61066fb106efa6d3d95b67e47b662de208b2b622
279,114,883,917,878,520,000,000,000,000,000,000,000
78
Added check for heap buffer overflow read
xmlGetLastChild(const xmlNode *parent) { if ((parent == NULL) || (parent->type == XML_NAMESPACE_DECL)) { #ifdef DEBUG_TREE xmlGenericError(xmlGenericErrorContext, "xmlGetLastChild : parent == NULL\n"); #endif return(NULL); } return(parent->last); }
0
[ "CWE-20" ]
libxml2
bdd66182ef53fe1f7209ab6535fda56366bd7ac9
254,311,889,997,851,130,000,000,000,000,000,000,000
10
Avoid building recursive entities For https://bugzilla.gnome.org/show_bug.cgi?id=762100 When we detect a recusive entity we should really not build the associated data, moreover if someone bypass libxml2 fatal errors and still tries to serialize a broken entity make sure we don't risk to get ito a recursion * parser...
static node_t **get_ppnode(huff_t* huff) { node_t **tppnode; if (!huff->freelist) { return &(huff->nodePtrs[huff->blocPtrs++]); } else { tppnode = huff->freelist; huff->freelist = (node_t **)*tppnode; return tppnode; } }
0
[ "CWE-119" ]
ioq3
d2b1d124d4055c2fcbe5126863487c52fd58cca1
170,484,242,423,545,440,000,000,000,000,000,000,000
10
Fix/improve buffer overflow in MSG_ReadBits/MSG_WriteBits Prevent reading past end of message in MSG_ReadBits. If read past end of msg->data buffer (16348 bytes) the engine could SEGFAULT. Make MSG_WriteBits use an exact buffer overflow check instead of possibly failing with a few bytes left.
static inline void gen_compute_eflags_c(DisasContext *s, TCGv reg) { gen_setcc1(s, JCC_B << 1, reg); }
0
[ "CWE-94" ]
qemu
30663fd26c0307e414622c7a8607fbc04f92ec14
145,633,007,746,404,280,000,000,000,000,000,000,000
4
tcg/i386: Check the size of instruction being translated This fixes the bug: 'user-to-root privesc inside VM via bad translation caching' reported by Jann Horn here: https://bugs.chromium.org/p/project-zero/issues/detail?id=1122 Reviewed-by: Richard Henderson <rth@twiddle.net> CC: Peter Maydell <peter.maydell@linaro....
sds catClientInfoString(sds s, client *client) { char flags[16], events[3], conninfo[CONN_INFO_LEN], *p; p = flags; if (client->flags & CLIENT_SLAVE) { if (client->flags & CLIENT_MONITOR) *p++ = 'O'; else *p++ = 'S'; } if (client->flags & CLIENT_MASTER) *p++ ...
0
[ "CWE-770" ]
redis
5674b0057ff2903d43eaff802017eddf37c360f8
147,122,654,801,116,130,000,000,000,000,000,000,000
68
Prevent unauthenticated client from easily consuming lots of memory (CVE-2021-32675) This change sets a low limit for multibulk and bulk length in the protocol for unauthenticated connections, so that they can't easily cause redis to allocate massive amounts of memory by sending just a few characters on the network. T...
get_message( message_t *message) { return message->msg; }
0
[ "CWE-77" ]
amanda
29bae2e271093cd8d06ea98f73a474c685c5a314
290,955,477,653,434,030,000,000,000,000,000,000,000
5
* application-src/ambsdtar.c, application-src/amgtar.c, application-src/amstar.c: Filter option from COMMAND-OPTIONS * common-src/ammessage.c: Add message. git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6483 a8d146d6-cc15-0410-8900-af154a0219e0
static void nci_init_complete_req(struct nci_dev *ndev, const void *opt) { struct nci_rf_disc_map_cmd cmd; struct disc_map_config *cfg = cmd.mapping_configs; __u8 *num = &cmd.num_mapping_configs; int i; /* set rf mapping configurations */ *num = 0; /* by default mapping is set to NCI_RF_INTERFACE_FRAME */ for...
0
[]
linux
48b71a9e66c2eab60564b1b1c85f4928ed04e406
13,254,353,101,343,853,000,000,000,000,000,000,000
35
NFC: add NCI_UNREG flag to eliminate the race There are two sites that calls queue_work() after the destroy_workqueue() and lead to possible UAF. The first site is nci_send_cmd(), which can happen after the nci_close_device as below nfcmrvl_nci_unregister_dev | nfc_genl_dev_up nci_close_device | f...
R_API char *r_bin_java_get_desc_from_cp_item_list(RList *cp_list, ut64 idx) { /* Given a constant poool object FieldRef, MethodRef, or InterfaceMethodRef return the actual descriptor string. @rvalue ut8* (user frees) or NULL */ RBinJavaCPTypeObj *obj = r_bin_java_get_item_from_cp_item_list (cp_list, idx); if (cp...
0
[ "CWE-787" ]
radare2
9650e3c352f675687bf6c6f65ff2c4a3d0e288fa
86,670,046,667,499,100,000,000,000,000,000,000,000
12
Fix oobread segfault in java arith8.class ##crash * Reported by Cen Zhang via huntr.dev
struct razer_report razer_chroma_misc_get_dpi_xy_byte(void) { struct razer_report report = get_razer_report(0x04, 0x81, 0x03); return report; }
0
[ "CWE-787" ]
openrazer
7e8a04feb378a679f1bcdcae079a5100cc45663b
41,439,238,952,979,886,000,000,000,000,000,000,000
6
Fix oob memcpy in matrix_custom_frame methods Adjust row_length if it exeeds the arguments array
SPL_METHOD(SplObjectStorage, rewind) { spl_SplObjectStorage *intern = Z_SPLOBJSTORAGE_P(getThis()); if (zend_parse_parameters_none() == FAILURE) { return; } zend_hash_internal_pointer_reset_ex(&intern->storage, &intern->pos); intern->index = 0; } /* }}} */
0
[ "CWE-119", "CWE-787" ]
php-src
61cdd1255d5b9c8453be71aacbbf682796ac77d4
228,383,668,649,797,940,000,000,000,000,000,000,000
11
Fix bug #73257 and bug #73258 - SplObjectStorage unserialize allows use of non-object as key