func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
dirserv_get_measured_bw_cache_size(void) { if (mbw_cache) return digestmap_size(mbw_cache); else return 0; }
0
[]
tor
02e05bd74dbec614397b696cfcda6525562a4675
248,009,964,521,378,880,000,000,000,000,000,000,000
5
When examining descriptors as a dirserver, reject ones with bad versions This is an extra fix for bug 21278: it ensures that these descriptors and platforms will never be listed in a legit consensus.
CImg<T>& draw_mandelbrot(const CImg<tc>& colormap, const float opacity=1, const double z0r=-2, const double z0i=-2, const double z1r=2, const double z1i=2, const unsigned int iteration_max=255, const bool is_normalized_iteration=...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
189,326,780,448,772,400,000,000,000,000,000,000,000
9
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int oidc_handle_redirect_uri_request(request_rec *r, oidc_cfg *c, oidc_session_t *session) { if (oidc_proto_is_redirect_authorization_response(r, c)) { /* this is an authorization response from the OP using the Basic Client profile or a Hybrid flow*/ return oidc_handle_redirect_authorization_response(r, c, ses...
0
[ "CWE-79" ]
mod_auth_openidc
55ea0a085290cd2c8cdfdd960a230cbc38ba8b56
287,739,443,425,073,780,000,000,000,000,000,000,000
109
Add a function to escape Javascript characters
static bool torture_winbind_struct_getdcname(struct torture_context *torture) { bool ok; bool strict = torture_setting_bool(torture, "strict mode", false); const char *domain_name = torture_setting_string(torture, "winbindd_netbios_domain", lpcfg_workgroup(torture->lp_ctx)); struct torture_trust_domain *l...
0
[ "CWE-476" ]
samba
0b259a48a70bde4dfd482e0720e593ae5a9c414a
72,509,794,746,456,680,000,000,000,000,000,000,000
51
CVE-2020-14323 torture4: Add a simple test for invalid lookup_sids winbind call We can't add this test before the fix, add it to knownfail and have the fix remove the knownfail entry again. As this crashes winbind, many tests after this one will fail. Reported by Bas Alberts of the GitHub Security Lab Team as GHSL-20...
next_flush (void *nxdata, uint32_t flags, int *err) { struct b_conn *b_conn = nxdata; return backend_flush (b_conn->b, b_conn->conn, flags, err); }
0
[ "CWE-406" ]
nbdkit
a6b88b195a959b17524d1c8353fd425d4891dc5f
97,011,715,186,057,380,000,000,000,000,000,000,000
5
server: Fix regression for NBD_OPT_INFO before NBD_OPT_GO Most known NBD clients do not bother with NBD_OPT_INFO (except for clients like 'qemu-nbd --list' that don't ever intend to connect), but go straight to NBD_OPT_GO. However, it's not too hard to hack up qemu to add in an extra client step (whether info on the ...
static inline struct epitem *ep_item_from_wait(wait_queue_t *p) { return container_of(p, struct eppoll_entry, wait)->base; }
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
205,847,572,008,547,260,000,000,000,000,000,000,000
4
epoll: limit paths The current epoll code can be tickled to run basically indefinitely in both loop detection path check (on ep_insert()), and in the wakeup paths. The programs that tickle this behavior set up deeply linked networks of epoll file descriptors that cause the epoll algorithms to traverse them indefinitel...
static void mon_text_read_statset(struct mon_reader_text *rp, struct mon_text_ptr *p, const struct mon_event_text *ep) { if (ep->setup_flag == 0) { /* Setup packet is present and captured */ p->cnt += snprintf(p->pbuf + p->cnt, p->limit - p->cnt, " s %02x %02x %04x %04x %04x", ep->setup[0], ep-...
0
[ "CWE-787" ]
linux
a5f596830e27e15f7a0ecd6be55e433d776986d8
88,759,259,737,484,520,000,000,000,000,000,000,000
20
usb: usbmon: Read text within supplied buffer size This change fixes buffer overflows and silent data corruption with the usbmon device driver text file read operations. Signed-off-by: Fredrik Noring <noring@nocrew.org> Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by...
static av_always_inline void mc_dir_part(H264Context *h, Picture *pic, int n, int square, int height, int delta, int list, uint8_t *dest_y, uint8_t *dest_cb, ...
0
[ "CWE-703" ]
FFmpeg
29ffeef5e73b8f41ff3a3f2242d356759c66f91f
304,778,857,413,998,530,000,000,000,000,000,000,000
112
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>
int usb_clear_halt(struct usb_device *dev, int pipe) { int result; int endp = usb_pipeendpoint(pipe); if (usb_pipein(pipe)) endp |= USB_DIR_IN; /* we don't care if it wasn't halted first. in fact some devices * (like some ibmcam model 1 units) seem to expect hosts to make * this request for iso endpoints, w...
0
[ "CWE-119", "CWE-787" ]
linux
2e1c42391ff2556387b3cb6308b24f6f65619feb
119,067,332,228,168,550,000,000,000,000,000,000,000
33
USB: core: harden cdc_parse_cdc_header Andrey Konovalov reported a possible out-of-bounds problem for the cdc_parse_cdc_header function. He writes: It looks like cdc_parse_cdc_header() doesn't validate buflen before accessing buffer[1], buffer[2] and so on. The only check present is while (buflen > 0). So fix thi...
static inline signed int ReadPropertySignedLong(const EndianType endian, const unsigned char *buffer) { union { unsigned int unsigned_value; signed int signed_value; } quantum; unsigned int value; if (endian == LSBEndian) { value=(unsigned int) buffer[3] << 24; val...
0
[ "CWE-190", "CWE-125" ]
ImageMagick
d8ab7f046587f2e9f734b687ba7e6e10147c294b
100,549,310,640,334,020,000,000,000,000,000,000,000
31
Improve checking of EXIF profile to prevent integer overflow (bug report from Ibrahim el-sayed)
Http::Status ConnectionImpl::dispatch(Buffer::Instance& data) { // TODO(#10878): Remove this wrapper when exception removal is complete. innerDispatch may either // throw an exception or return an error status. The utility wrapper catches exceptions and // converts them to error statuses. return Utility::except...
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
198,646,565,311,806,600,000,000,000,000,000,000,000
7
[http1] Include request URL in request header size computation, and reject partial headers that exceed configured limits (#145) Signed-off-by: antonio <avd@google.com>
R_API ut8* r_socket_slurp(RSocket *s, int *len) { int blockSize = 4096; ut8 *ptr, *buf = malloc (blockSize); if (!buf) { return NULL; } int copied = 0; if (len) { *len = 0; } for (;;) { int rc = r_socket_read (s, buf + copied, blockSize); if (rc > 0) { copied += rc; } ptr = realloc (buf, copied +...
0
[ "CWE-78" ]
radare2
04edfa82c1f3fa2bc3621ccdad2f93bdbf00e4f9
295,971,544,552,692,130,000,000,000,000,000,000,000
32
Fix command injection on PDB download (#16966) * Fix r_sys_mkdirp with absolute path on Windows * Fix build with --with-openssl * Use RBuffer in r_socket_http_answer() * r_socket_http_answer: Fix read for big responses * Implement r_str_escape_sh() * Cleanup r_socket_connect() on Windows * Fix socket being creat...
cursorcmd(void) { if (cmd_silent) return; #ifdef FEAT_RIGHTLEFT if (cmdmsg_rl) { msg_row = cmdline_row + (ccline.cmdspos / (int)(Columns - 1)); msg_col = (int)Columns - (ccline.cmdspos % (int)(Columns - 1)) - 1; if (msg_row <= 0) msg_row = Rows - 1; } else #endif { msg_row = cmdline_...
0
[ "CWE-122", "CWE-787" ]
vim
85b6747abc15a7a81086db31289cf1b8b17e6cb1
8,754,977,140,868,915,000,000,000,000,000,000,000
31
patch 8.2.4214: illegal memory access with large 'tabstop' in Ex mode Problem: Illegal memory access with large 'tabstop' in Ex mode. Solution: Allocate enough memory.
CNF_GetMinSamples(void) { return min_samples; }
0
[ "CWE-59" ]
chrony
e18903a6b56341481a2e08469c0602010bf7bfe3
133,049,616,055,806,490,000,000,000,000,000,000,000
4
switch to new util file functions Replace all fopen(), rename(), and unlink() calls with the new util functions.
pch_hunk_beg (void) { return p_hunk_beg; }
0
[ "CWE-59" ]
patch
44a987e02f04b9d81a0db4a611145cad1093a2d3
211,681,317,302,981,300,000,000,000,000,000,000,000
4
Add line number overflow checking * bootstrap.conf: use intprops module. * src/common.h: Define LINENUM_MIN and LINENUM_MAX macros. * src/pch.c (another_hunk): Add line number overflow checking. Based on Robert C. Seacord's INT32-C document for integer overflow checking and Tobias Stoeckmann's "integer overflows and ...
static int mailbox_delete_sieve(struct mailbox *mailbox) { struct sieve_db *sievedb = NULL; if (mbtype_isa(mailbox_mbtype(mailbox)) != MBTYPE_SIEVE) return 0; sievedb = sievedb_open_mailbox(mailbox); if (sievedb) { int r = sievedb_delmbox(sievedb); sievedb_close(sievedb); if (r...
0
[]
cyrus-imapd
1d6d15ee74e11a9bd745e80be69869e5fb8d64d6
294,117,279,176,983,000,000,000,000,000,000,000,000
15
mailbox.c/reconstruct.c: Add mailbox_mbentry_from_path()
void read_user_name(char *name) { if (geteuid() == 0) strcpy(name,"root"); /* allow use of surun */ else { #ifdef HAVE_GETPWUID struct passwd *skr; const char *str; if ((str=getlogin()) == NULL) { if ((skr=getpwuid(geteuid())) != NULL) str=skr->pw_name; else if (!(str=getenv("USE...
0
[]
mariadb-connector-c
27b2f3d1f1550dfaee0f63a331a406ab31c1b37e
102,465,961,419,700,770,000,000,000,000,000,000,000
26
various checks for corrupted packets in the protocol also: check the return value of unpack_fields()
void * TDStretch::operator new(size_t s) { // Notice! don't use "new TDStretch" directly, use "newInstance" to create a new instance instead! ST_THROW_RT_ERROR("Error in TDStretch::new: Don't use 'new TDStretch' directly, use 'newInstance' member instead!"); return newInstance(); }
0
[ "CWE-617" ]
soundtouch
107f2c5d201a4dfea1b7f15c5957ff2ac9e5f260
197,638,720,532,145,670,000,000,000,000,000,000,000
6
Replaced illegal-number-of-channel assertions with run-time exception
hostkey_method_ssh_ed25519_signv(LIBSSH2_SESSION * session, unsigned char **signature, size_t *signature_len, int veccount, const struct iovec datavec[], void **abstract) { libssh2_...
0
[ "CWE-787" ]
libssh2
dc109a7f518757741590bb993c0c8412928ccec2
224,500,439,589,211,700,000,000,000,000,000,000,000
16
Security fixes (#315) * Bounds checks Fixes for CVEs https://www.libssh2.org/CVE-2019-3863.html https://www.libssh2.org/CVE-2019-3856.html * Packet length bounds check CVE https://www.libssh2.org/CVE-2019-3855.html * Response length check CVE https://www.libssh2.org/CVE-2019-3859.html * Bounds ch...
adv_error adv_png_read( unsigned* pix_width, unsigned* pix_height, unsigned* pix_pixel, unsigned char** dat_ptr, unsigned* dat_size, unsigned char** pix_ptr, unsigned* pix_scanline, unsigned char** pal_ptr, unsigned* pal_size, adv_fz* f) { adv_error r; unsigned char* rns_ptr; unsigned rns_size; r = adv_png_re...
0
[ "CWE-119" ]
advancecomp
78a56b21340157775be2462a19276b4d31d2bd01
77,097,409,419,169,560,000,000,000,000,000,000,000
18
Fix a buffer overflow caused by invalid images
unix_sck_send_disconnect(hsm_com_client_hdl_t *hdl, int timeout) { hsm_com_discon_data_t msg; memset(&msg,0,sizeof(msg)); msg.header.cmd = HSM_COM_CMD_DISC; msg.header.ver = HSM_COM_VER; msg.header.trans_id = hdl->trans_id++; msg.header.payload_len = 0; if(unix_sck_send_msg(hdl, (char*)&msg, sizeof...
0
[ "CWE-362" ]
opa-fm
c5759e7b76f5bf844be6c6641cc1b356bbc83869
92,649,357,152,402,150,000,000,000,000,000,000,000
29
Fix scripts and code that use well-known tmp files.
static const char *ext4_decode_error(struct super_block *sb, int errno, char nbuf[16]) { char *errstr = NULL; switch (errno) { case -EIO: errstr = "IO failure"; break; case -ENOMEM: errstr = "Out of memory"; break; case -EROFS: if (!sb || (EXT4_SB(sb)->s_journal && EXT4_SB(sb)->s_journal...
0
[ "CWE-703" ]
linux
744692dc059845b2a3022119871846e74d4f6e11
116,423,363,737,759,560,000,000,000,000,000,000,000
33
ext4: use ext4_get_block_write in buffer write Allocate uninitialized extent before ext4 buffer write and convert the extent to initialized after io completes. The purpose is to make sure an extent can only be marked initialized after it has been written with new data so we can safely drop the i_mutex lock in ext4 DIO...
dotraplinkage void do_mce(struct pt_regs *regs, long error_code) { machine_check_vector(regs, error_code); }
0
[ "CWE-362" ]
linux
b3b7c4795ccab5be71f080774c45bbbcc75c2aaf
134,998,688,539,079,150,000,000,000,000,000,000,000
4
x86/MCE: Serialize sysfs changes The check_interval file in /sys/devices/system/machinecheck/machinecheck<cpu number> directory is a global timer value for MCE polling. If it is changed by one CPU, mce_restart() broadcasts the event to other CPUs to delete and restart the MCE polling timer and __mcheck_cpu_init_ti...
GF_Err pasp_box_dump(GF_Box *a, FILE * trace) { GF_PixelAspectRatioBox *ptr = (GF_PixelAspectRatioBox*)a; gf_isom_box_dump_start(a, "PixelAspectRatioBox", trace); gf_fprintf(trace, "hSpacing=\"%d\" vSpacing=\"%d\" >\n", ptr->hSpacing, ptr->vSpacing); gf_isom_box_dump_done("PixelAspectRatioBox", a, trace); return G...
0
[ "CWE-787" ]
gpac
ea1eca00fd92fa17f0e25ac25652622924a9a6a0
160,306,931,294,220,700,000,000,000,000,000,000,000
8
fixed #2138
Perl__invlist_intersection_maybe_complement_2nd(pTHX_ SV* const a, SV* const b, const bool complement_b, SV** i) { /* Take the intersection of two inversion lists and point '*i' to it. On * input, '*i' MUST POINT TO NULL OR TO AN SV* INVERSION LIST (possibly ...
0
[ "CWE-125" ]
perl5
43b2f4ef399e2fd7240b4eeb0658686ad95f8e62
160,066,076,596,634,500,000,000,000,000,000,000,000
236
regcomp.c: Convert some strchr to memchr This allows things to work properly in the face of embedded NULs. See the branch merge message for more information.
static int acm_tty_open(struct tty_struct *tty, struct file *filp) { struct acm *acm = tty->driver_data; return tty_port_open(&acm->port, tty, filp); }
0
[ "CWE-416" ]
linux
c52873e5a1ef72f845526d9f6a50704433f9c625
38,232,624,834,230,315,000,000,000,000,000,000,000
6
usb: cdc-acm: make sure a refcount is taken early enough destroy() will decrement the refcount on the interface, so that it needs to be taken so early that it never undercounts. Fixes: 7fb57a019f94e ("USB: cdc-acm: Fix potential deadlock (lockdep warning)") Cc: stable <stable@vger.kernel.org> Reported-and-tested-by: ...
do_pdf_save_document(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, pdf_write_options *in_opts) { int lastfree; int num; int xref_len; if (in_opts->do_incremental) { /* If no changes, nothing to write */ if (doc->num_incremental_sections == 0) return; if (opts->out) { fz_seek_output(ctx,...
1
[ "CWE-119" ]
mupdf
520cc26d18c9ee245b56e9e91f9d4fcae02be5f0
15,103,768,846,668,663,000,000,000,000,000,000,000
163
Bug 689699: Avoid buffer overrun. When cleaning a pdf file, various lists (of pdf_xref_len length) are defined early on. If we trigger a repair during the clean, this can cause pdf_xref_len to increase causing an overrun. Fix this by watching for changes in the length, and checking accesses to the list for validity....
int hfi1_user_sdma_free_queues(struct hfi1_filedata *fd, struct hfi1_ctxtdata *uctxt) { struct hfi1_user_sdma_pkt_q *pq; trace_hfi1_sdma_user_free_queues(uctxt->dd, uctxt->ctxt, fd->subctxt); spin_lock(&fd->pq_rcu_lock); pq = srcu_dereference_check(fd->pq, &fd->pq_srcu, lockdep_is_held(&fd->pq_r...
0
[ "CWE-416" ]
linux
3d2a9d642512c21a12d19b9250e7a835dcb41a79
333,661,852,393,134,740,000,000,000,000,000,000,000
37
IB/hfi1: Ensure correct mm is used at all times Two earlier bug fixes have created a security problem in the hfi1 driver. One fix aimed to solve an issue where current->mm was not valid when closing the hfi1 cdev. It attempted to do this by saving a cached value of the current->mm pointer at file open time. This is a ...
static int hso_serial_write(struct tty_struct *tty, const unsigned char *buf, int count) { struct hso_serial *serial = tty->driver_data; int space, tx_bytes; unsigned long flags; /* sanity check */ if (serial == NULL) { pr_err("%s: serial is NULL\n", __func__); return -ENODEV; } spin_lock_irqsave(&s...
0
[ "CWE-125" ]
linux
5146f95df782b0ac61abde36567e718692725c89
328,253,146,384,626,450,000,000,000,000,000,000,000
31
USB: hso: Fix OOB memory access in hso_probe/hso_get_config_data The function hso_probe reads if_num from the USB device (as an u8) and uses it without a length check to index an array, resulting in an OOB memory read in hso_probe or hso_get_config_data. Add a length check for both locations and updated hso_probe to ...
TPMI_RH_HIERARCHY_Marshal(TPMI_RH_HIERARCHY *source, BYTE **buffer, INT32 *size) { UINT16 written = 0; written += TPM_HANDLE_Marshal(source, buffer, size); return written; }
0
[ "CWE-787" ]
libtpms
3ef9b26cb9f28bd64d738bff9505a20d4eb56acd
231,272,427,537,915,740,000,000,000,000,000,000,000
6
tpm2: Add maxSize parameter to TPM2B_Marshal for sanity checks Add maxSize parameter to TPM2B_Marshal and assert on it checking the size of the data intended to be marshaled versus the maximum buffer size. Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
static int em28xx_hint_board(struct em28xx *dev) { int i; if (dev->is_webcam) { if (dev->em28xx_sensor == EM28XX_MT9V011) { dev->model = EM2820_BOARD_SILVERCREST_WEBCAM; } else if (dev->em28xx_sensor == EM28XX_MT9M001 || dev->em28xx_sensor == EM28XX_MT9M111) { dev->model = EM2750_BOARD_UNKNOWN; } ...
0
[ "CWE-416" ]
linux
c08eadca1bdfa099e20a32f8fa4b52b2f672236d
149,885,935,550,725,750,000,000,000,000,000,000,000
91
media: em28xx: initialize refcount before kref_get The commit 47677e51e2a4("[media] em28xx: Only deallocate struct em28xx after finishing all extensions") adds kref_get to many init functions (e.g., em28xx_audio_init). However, kref_init is called too late in em28xx_usb_probe, since em28xx_init_dev before will invoke ...
server_check_dh(krb5_context context, pkinit_plg_crypto_context cryptoctx, pkinit_req_crypto_context req_cryptoctx, pkinit_identity_crypto_context id_cryptoctx, krb5_data *dh_params, int minbits) { DH *dh = NULL; const BIGNUM *p; ...
0
[ "CWE-119", "CWE-787" ]
krb5
fbb687db1088ddd894d975996e5f6a4252b9a2b4
21,941,111,849,296,544,000,000,000,000,000,000,000
38
Fix PKINIT cert matching data construction Rewrite X509_NAME_oneline_ex() and its call sites to use dynamic allocation and to perform proper error checking. ticket: 8617 target_version: 1.16 target_version: 1.15-next target_version: 1.14-next tags: pullup
mono_lookup_pinvoke_call (MonoMethod *method, const char **exc_class, const char **exc_arg) { MonoImage *image = method->klass->image; MonoMethodPInvoke *piinfo = (MonoMethodPInvoke *)method; MonoTableInfo *tables = image->tables; MonoTableInfo *im = &tables [MONO_TABLE_IMPLMAP]; MonoTableInfo *mr = &tables [MONO_...
1
[]
mono
8e890a3bf80a4620e417814dc14886b1bbd17625
320,715,786,743,187,800,000,000,000,000,000,000,000
276
Search for dllimported shared libs in the base directory, not cwd. * loader.c: we don't search the current directory anymore for shared libraries referenced in DllImport attributes, as it has a slight security risk. We search in the same directory where the referencing image was loaded from, instead. Fixes bug# 641915...
flatpak_deploy_finalize (GObject *object) { FlatpakDeploy *self = FLATPAK_DEPLOY (object); g_clear_pointer (&self->ref, flatpak_decomposed_unref); g_clear_object (&self->dir); g_clear_pointer (&self->metadata, g_key_file_unref); g_clear_pointer (&self->system_overrides, flatpak_context_free); g_clear_point...
0
[ "CWE-74" ]
flatpak
fb473cad801c6b61706353256cab32330557374a
157,705,758,299,893,200,000,000,000,000,000,000,000
15
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...
explicit BlockingWriteClient(AsyncSSLSocket::UniquePtr socket) : socket_(std::move(socket)), bufLen_(2500), iovCount_(2000) { // Fill buf_ buf_ = std::make_unique<uint8_t[]>(bufLen_); for (uint32_t n = 0; n < sizeof(buf_); ++n) { buf_[n] = n % 0xff; } // Initialize iov_ iov_ = std...
0
[ "CWE-125" ]
folly
c321eb588909646c15aefde035fd3133ba32cdee
67,372,162,178,622,780,000,000,000,000,000,000,000
21
Handle close_notify as standard writeErr in AsyncSSLSocket. Summary: Fixes CVE-2019-11934 Reviewed By: mingtaoy Differential Revision: D18020613 fbshipit-source-id: db82bb250e53f0d225f1280bd67bc74abd417836
const string name() override { return "get_lifecycle"; }
0
[ "CWE-770" ]
ceph
ab29bed2fc9f961fe895de1086a8208e21ddaddc
28,760,505,030,339,527,000,000,000,000,000,000,000
1
rgw: fix issues with 'enforce bounds' patch The patch to enforce bounds on max-keys/max-uploads/max-parts had a few issues that would prevent us from compiling it. Instead of changing the code provided by the submitter, we're addressing them in a separate commit to maintain the DCO. Signed-off-by: Joao Eduardo Luis <...
free_token (re_token_t *node) { #ifdef RE_ENABLE_I18N if (node->type == COMPLEX_BRACKET && node->duplicated == 0) free_charset (node->opr.mbcset); else #endif /* RE_ENABLE_I18N */ if (node->type == SIMPLE_BRACKET && node->duplicated == 0) re_free (node->opr.sbcset); }
0
[ "CWE-19" ]
gnulib
5513b40999149090987a0341c018d05d3eea1272
264,863,399,986,286,300,000,000,000,000,000,000,000
10
Diagnose ERE '()|\1' Problem reported by Hanno Böck in: http://bugs.gnu.org/21513 * lib/regcomp.c (parse_reg_exp): While parsing alternatives, keep track of the set of previously-completed subexpressions available before the first alternative, and restore this set just before parsing each subsequent alternative. This...
pam_sm_open_session(pam_handle_t *pamh, int flags UNUSED, int argc, const char **argv) { int retval; char *val, *mntdevice = NULL; const void *user; const struct passwd *pwd; struct pam_params param = { .start_uid = PAM_USERTYPE_UIDMIN, .end_uid = 0, .fs = NULL }; struct ...
0
[]
linux-pam
27ded8954a1235bb65ffc9c730ae5a50b1dfed61
237,449,438,903,792,000,000,000,000,000,000,000,000
213
pam_setquota: skip mountpoints equal to the user's $HOME Matthias Gerstner found the following issue: <quote> So this pam_setquota module iterates over all mounted file systems using `setmntent()` and `getmntent()`. It tries to find the longest match of a file system mounted on /home/$USER or above (except when the ...
Frame_cursor() : sum_functions(), perform_no_action(false) {}
0
[]
server
ba4927e520190bbad763bb5260ae154f29a61231
259,829,118,624,146,560,000,000,000,000,000,000,000
1
MDEV-19398: Assertion `item1->type() == Item::FIELD_ITEM ... Window Functions code tries to minimize the number of times it needs to sort the select's resultset by finding "compatible" OVER (PARTITION BY ... ORDER BY ...) clauses. This employs compare_order_elements(). That function assumed that the order expressions...
void in6_dev_finish_destroy(struct inet6_dev *idev) { struct net_device *dev = idev->dev; WARN_ON(!list_empty(&idev->addr_list)); WARN_ON(idev->mc_list); WARN_ON(timer_pending(&idev->rs_timer)); #ifdef NET_REFCNT_DEBUG pr_debug("%s: %s\n", __func__, dev ? dev->name : "NIL"); #endif dev_put(dev); if (!idev->dea...
0
[]
net
6c8991f41546c3c472503dff1ea9daaddf9331c2
98,420,295,996,229,700,000,000,000,000,000,000,000
18
net: ipv6_stub: use ip6_dst_lookup_flow instead of ip6_dst_lookup ipv6_stub uses the ip6_dst_lookup function to allow other modules to perform IPv6 lookups. However, this function skips the XFRM layer entirely. All users of ipv6_stub->ip6_dst_lookup use ip_route_output_flow (via the ip_route_output_key and ip_route_o...
static int parse_next_header_init(struct message_parser_ctx *ctx, struct message_block *block_r) { i_assert(ctx->hdr_parser_ctx == NULL); ctx->hdr_parser_ctx = message_parse_header_init(ctx->input, &ctx->part->header_size, ctx->hdr_flags); ctx->part_seen_content_type = FALSE; ctx->prev_hdr_newline_s...
0
[ "CWE-20" ]
core
fb97a1cddbda4019e327fa736972a1c7433fedaa
55,086,482,715,257,770,000,000,000,000,000,000,000
14
lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit The limit could have been exceeded with message/rfc822 parts.
int ff_rm_read_mdpr_codecdata(AVFormatContext *s, AVIOContext *pb, AVStream *st, RMStream *rst, unsigned int codec_data_size, const uint8_t *mime) { unsigned int v; int size; int64_t codec_pos; int ret; if (codec_data_size > INT_MAX) ...
0
[ "CWE-399", "CWE-834" ]
FFmpeg
124eb202e70678539544f6268efc98131f19fa49
229,129,919,676,641,650,000,000,000,000,000,000,000
106
avformat/rmdec: Fix DoS due to lack of eof check Fixes: loop.ivr Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev, struct net_device *netdev, const u8 *bssid, gfp_t gfp) { struct sk_buff *msg; void *hdr; msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp); if (!msg) return; hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_JOIN_IBSS); if (!hdr) { nl...
0
[ "CWE-120" ]
linux
f88eb7c0d002a67ef31aeb7850b42ff69abc46dc
208,514,998,011,489,200,000,000,000,000,000,000,000
31
nl80211: validate beacon head We currently don't validate the beacon head, i.e. the header, fixed part and elements that are to go in front of the TIM element. This means that the variable elements there can be malformed, e.g. have a length exceeding the buffer size, but most downstream code from this assumes that thi...
xmlRelaxNGParseDocument(xmlRelaxNGParserCtxtPtr ctxt, xmlNodePtr node) { xmlRelaxNGPtr schema = NULL; const xmlChar *olddefine; xmlRelaxNGGrammarPtr old; if ((ctxt == NULL) || (node == NULL)) return (NULL); schema = xmlRelaxNGNewRelaxNG(ctxt); if (schema == NULL) return (NULL);...
0
[ "CWE-134" ]
libxml2
502f6a6d08b08c04b3ddfb1cd21b2f699c1b7f5b
267,247,673,247,733,200,000,000,000,000,000,000,000
71
More format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 adds a new xmlEscapeFormatString() function to escape composed format strings
static inline int gup_huge_pd(hugepd_t hugepd, unsigned long addr, unsigned int pdshift, unsigned long end, unsigned int flags, struct page **pages, int *nr) { return 0; }
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
130,987,160,565,408,670,000,000,000,000,000,000,000
6
gup: document and work around "COW can break either way" issue Doing a "get_user_pages()" on a copy-on-write page for reading can be ambiguous: the page can be COW'ed at any time afterwards, and the direction of a COW event isn't defined. Yes, whoever writes to it will generally do the COW, but if the thread that did...
static void setup_pageset(struct per_cpu_pageset *p, unsigned long batch) { pageset_init(p); pageset_set_batch(p, batch); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
276,075,745,636,240,060,000,000,000,000,000,000,000
5
mm: don't warn about allocations which stall for too long Commit 63f53dea0c98 ("mm: warn about allocations which stall for too long") was a great step for reducing possibility of silent hang up problem caused by memory allocation stalls. But this commit reverts it, for it is possible to trigger OOM lockup and/or soft...
ofpact_hdrs_hash(const struct ofpact_hdrs *hdrs) { return hash_2words(hdrs->vendor, ((uint32_t) hdrs->type << 16) | hdrs->ofp_version); }
0
[ "CWE-416" ]
ovs
77cccc74deede443e8b9102299efc869a52b65b2
271,693,348,733,097,700,000,000,000,000,000,000,000
5
ofp-actions: Fix use-after-free while decoding RAW_ENCAP. While decoding RAW_ENCAP action, decode_ed_prop() might re-allocate ofpbuf if there is no enough space left. However, function 'decode_NXAST_RAW_ENCAP' continues to use old pointer to 'encap' structure leading to write-after-free and incorrect decoding. ==3...
static int huf_uncompress(EXRContext *s, EXRThreadData *td, GetByteContext *gb, uint16_t *dst, int dst_size) { int32_t im, iM; uint32_t nBits; int ret; im = bytestream2_get_le32(gb); iM = bytestream2_get_le32(...
0
[ "CWE-20", "CWE-129" ]
FFmpeg
26d3c81bc5ef2f8c3f09d45eaeacfb4b1139a777
97,808,097,754,160,210,000,000,000,000,000,000,000
41
avcodec/exr: More strictly check dc_count Fixes: out of array access Fixes: exr/deneme Found-by: Burak Çarıkçı <burakcarikci@crypttech.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
parse_keyword(struct archive_read *a, struct mtree *mtree, struct archive_entry *entry, struct mtree_option *opt, int *parsed_kws) { char *val, *key; key = opt->value; if (*key == '\0') return (ARCHIVE_OK); if (strcmp(key, "nochange") == 0) { *parsed_kws |= MTREE_HAS_NOCHANGE; return (ARCHIVE_OK); } ...
0
[ "CWE-476", "CWE-119" ]
libarchive
a550daeecf6bc689ade371349892ea17b5b97c77
243,429,787,779,829,170,000,000,000,000,000,000,000
238
Fix libarchive/archive_read_support_format_mtree.c:1388:11: error: array subscript is above array bounds
static inline void addrconf_sysctl_unregister(struct inet6_dev *idev) { }
0
[]
net
4b08a8f1bd8cb4541c93ec170027b4d0782dab52
168,984,039,980,734,720,000,000,000,000,000,000,000
3
ipv6: remove max_addresses check from ipv6_create_tempaddr Because of the max_addresses check attackers were able to disable privacy extensions on an interface by creating enough autoconfigured addresses: <http://seclists.org/oss-sec/2012/q4/292> But the check is not actually needed: max_addresses protects the kerne...
xmlSchemaAddSchemaDoc(xmlSchemaParserCtxtPtr pctxt, int type, /* import or include or redefine */ const xmlChar *schemaLocation, xmlDocPtr schemaDoc, const char *schemaBuffer, int schemaBufferLen, xmlNodePtr invokingNode, const xmlChar *sourceTargetNamespace, const xmlChar *importNamespace, xmlSchemaB...
0
[ "CWE-134" ]
libxml2
4472c3a5a5b516aaf59b89be602fbce52756c3e9
224,854,224,984,687,300,000,000,000,000,000,000,000
410
Fix some format string warnings with possible format string vulnerability For https://bugzilla.gnome.org/show_bug.cgi?id=761029 Decorate every method in libxml2 with the appropriate LIBXML_ATTR_FORMAT(fmt,args) macro and add some cleanups following the reports.
longlong Item_func_dyncol_check::val_int() { char buff[STRING_BUFFER_USUAL_SIZE]; String tmp(buff, sizeof(buff), &my_charset_bin); DYNAMIC_COLUMN col; String *str; enum enum_dyncol_func_result rc; str= args[0]->val_str(&tmp); if (args[0]->null_value) goto null; col.length= str->length(); /* We do...
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
259,699,940,734,488,360,000,000,000,000,000,000,000
27
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 ...
explicit SqrtDivToRsqrtMulStage(const GraphOptimizerContext& ctx, const ArithmeticOptimizerContext& ctx_ext) : ArithmeticOptimizerStage("SqrtDivToRsqrtMul", ctx, ctx_ext) {}
0
[ "CWE-476" ]
tensorflow
e6340f0665d53716ef3197ada88936c2a5f7a2d3
213,729,361,224,452,120,000,000,000,000,000,000,000
3
Handle a special grappler case resulting in crash. It might happen that a malformed input could be used to trick Grappler into trying to optimize a node with no inputs. This, in turn, would produce a null pointer dereference and a segfault. PiperOrigin-RevId: 369242852 Change-Id: I2e5cbe7aec243d34a6d60220ac8ac9b16f13...
pstrcmp(const void *a, const void *b) { return (pathcmp(*(char **)a, *(char **)b, -1)); }
0
[ "CWE-823", "CWE-703" ]
vim
5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
86,734,239,651,169,900,000,000,000,000,000,000,000
4
patch 8.2.4418: crash when using special multi-byte character Problem: Crash when using special multi-byte character. Solution: Don't use isalpha() for an arbitrary character.
static void HeaderMapImplGetByteSize(benchmark::State& state) { HeaderMapImpl headers; addDummyHeaders(headers, state.range(0)); uint64_t size = 0; for (auto _ : state) { size += headers.byteSize().value(); } benchmark::DoNotOptimize(size); }
0
[ "CWE-400", "CWE-703" ]
envoy
afc39bea36fd436e54262f150c009e8d72db5014
272,330,263,356,419,960,000,000,000,000,000,000,000
9
Track byteSize of HeaderMap internally. Introduces a cached byte size updated internally in HeaderMap. The value is stored as an optional, and is cleared whenever a non-const pointer or reference to a HeaderEntry is accessed. The cached value can be set with refreshByteSize() which performs an iteration over the Heade...
static void jpc_dequantize(jas_matrix_t *x, jpc_fix_t absstepsize) { int i; int j; int t; assert(absstepsize >= 0); if (absstepsize == jpc_inttofix(1)) { return; } for (i = 0; i < jas_matrix_numrows(x); ++i) { for (j = 0; j < jas_matrix_numcols(x); ++j) { t = jas_matrix_get(x, i, j); if (t) { t =...
0
[ "CWE-189" ]
jasper
3c55b399c36ef46befcb21e4ebc4799367f89684
239,353,335,623,396,040,000,000,000,000,000,000,000
24
At many places in the code, jas_malloc or jas_recalloc was being invoked with the size argument being computed in a manner that would not allow integer overflow to be detected. Now, these places in the code have been modified to use special-purpose memory allocation functions (e.g., jas_alloc2, jas_alloc3, jas_realloc...
static js_Ast *relational(js_State *J, int notin) { js_Ast *a = shift(J); SAVEREC(); loop: INCREC(); if (jsP_accept(J, '<')) { a = EXP2(LT, a, shift(J)); goto loop; } if (jsP_accept(J, '>')) { a = EXP2(GT, a, shift(J)); goto loop; } if (jsP_accept(J, TK_LE)) { a = EXP2(LE, a, shift(J)); goto loop; } if (jsP_acce...
0
[ "CWE-674" ]
mujs
4d45a96e57fbabf00a7378b337d0ddcace6f38c1
285,365,343,103,669,900,000,000,000,000,000,000,000
15
Guard binary expressions from too much recursion.
static int __bprm_mm_init(struct linux_binprm *bprm) { int err; struct vm_area_struct *vma = NULL; struct mm_struct *mm = bprm->mm; bprm->vma = vma = vm_area_alloc(mm); if (!vma) return -ENOMEM; vma_set_anonymous(vma); if (mmap_write_lock_killable(mm)) { err = -EINTR; goto err_free; } /* * Place the...
0
[]
linux
0f2122045b946241a9e549c2a76cea54fa58a7ff
320,196,265,193,032,230,000,000,000,000,000,000,000
43
io_uring: don't rely on weak ->files references Grab actual references to the files_struct. To avoid circular references issues due to this, we add a per-task note that keeps track of what io_uring contexts a task has used. When the tasks execs or exits its assigned files, we cancel requests based on this tracking. W...
} catch (...) { return exceptionToStatus(); }
1
[ "CWE-863" ]
mongo
a93cfd354467981c9cf944a4ada748d0226fdfb0
2,654,485,269,205,986,400,000,000,000,000,000,000
3
SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON (cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b) (cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36) (cherry picked from commit fb87cc88ecb5d300f14cda7bc238d7d5132118f5)
int tty_insert_flip_string_flags(struct tty_struct *tty, const unsigned char *chars, const char *flags, size_t size) { int copied = 0; do { int goal = min_t(size_t, size - copied, TTY_BUFFER_PAGE); int space = tty_buffer_request_room(tty, goal); struct tty_buffer *tb = tty->buf.tail; /* If there is no space...
1
[]
linux
c56a00a165712fd73081f40044b1e64407bb1875
297,704,145,455,341,420,000,000,000,000,000,000,000
22
tty: hold lock across tty buffer finding and buffer filling tty_buffer_request_room is well protected, but while after it returns, it releases the port->lock. tty->buf.tail might be modified by either irq handler or other threads. The patch adds more protection by holding the lock across tty buffer finding and buffer...
int btrfs_search_forward(struct btrfs_root *root, struct btrfs_key *min_key, struct btrfs_path *path, u64 min_trans) { struct extent_buffer *cur; struct btrfs_key found_key; int slot; int sret; u32 nritems; int level; int ret = 1; int keep_locks = path->keep_locks; path->keep_locks = 1; again: cur = ...
0
[ "CWE-416", "CWE-362" ]
linux
5f5bc6b1e2d5a6f827bc860ef2dc5b6f365d1339
298,223,635,647,032,420,000,000,000,000,000,000,000
99
Btrfs: make xattr replace operations atomic Replacing a xattr consists of doing a lookup for its existing value, delete the current value from the respective leaf, release the search path and then finally insert the new value. This leaves a time window where readers (getxattr, listxattrs) won't see any value for the x...
int CMSEXPORT cmsIT8SetTableByLabel(cmsHANDLE hIT8, const char* cSet, const char* cField, const char* ExpectedType) { const char* cLabelFld; char Type[256], Label[256]; int nTable; _cmsAssert(hIT8 != NULL); if (cField != NULL && *cField == 0) cField = "LABEL"; if (cField == NULL) ...
0
[]
Little-CMS
65e2f1df3495edc984f7e0d7b7b24e29d851e240
66,380,737,482,445,900,000,000,000,000,000,000,000
30
Fix some warnings from static analysis
std::string Box_dref::dump(Indent& indent) const { std::ostringstream sstr; sstr << Box::dump(indent); sstr << dump_children(indent); return sstr.str(); }
0
[ "CWE-703" ]
libheif
2710c930918609caaf0a664e9c7bc3dce05d5b58
67,833,264,318,400,430,000,000,000,000,000,000,000
8
force fraction to a limited resolution to finally solve those pesky numerical edge cases
SYSCALL_DEFINE2(io_uring_setup, u32, entries, struct io_uring_params __user *, params) { return io_uring_setup(entries, params); }
0
[]
linux
181e448d8709e517c9c7b523fcd209f24eb38ca7
313,531,148,392,930,050,000,000,000,000,000,000,000
5
io_uring: async workers should inherit the user creds If we don't inherit the original task creds, then we can confuse users like fuse that pass creds in the request header. See link below on identical aio issue. Link: https://lore.kernel.org/linux-fsdevel/26f0d78e-99ca-2f1b-78b9-433088053a61@scylladb.com/T/#u Signed...
void reload_config(void) { struct Interface *iface; flog(LOG_INFO, "attempting to reread config file"); dlog(LOG_DEBUG, 4, "reopening log"); if (log_reopen() < 0) { perror("log_reopen"); exit(1); } iface=IfaceList; while(iface) { struct Interface *next_iface = iface->next; struct AdvPrefix *prefix; ...
0
[ "CWE-20" ]
radvd
2c50375043186e133f15135f4c93ca964238ee60
65,567,125,993,411,570,000,000,000,000,000,000,000
82
main() must fail on privsep_init() errors, it must not run without privilege separation as privsep is expected.
void arch_pick_mmap_layout(struct mm_struct *mm) { unsigned long random_factor = 0UL; if (current->flags & PF_RANDOMIZE) random_factor = arch_mmap_rnd(); if (mmap_is_legacy()) { mm->mmap_base = TASK_UNMAPPED_BASE + random_factor; mm->get_unmapped_area = arch_get_unmapped_area; } else { mm->mmap_base = mma...
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
35,271,021,082,496,513,000,000,000,000,000,000,000
15
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
void CLASS packed_dng_load_raw() { ushort *pixel, *rp; int row, col; pixel = (ushort *)calloc(raw_width, tiff_samples * sizeof *pixel); merror(pixel, "packed_dng_load_raw()"); #ifdef LIBRAW_LIBRARY_BUILD try { #endif for (row = 0; row < raw_height; row++) { #ifdef LIBRAW_LIBRARY_BUILD checkCa...
0
[ "CWE-476", "CWE-119" ]
LibRaw
d7c3d2cb460be10a3ea7b32e9443a83c243b2251
29,068,063,707,179,543,000,000,000,000,000,000,000
37
Secunia SA75000 advisory: several buffer overruns
long long stringToInt(const char *s) { return stringToIntWithRadix(s,0,NULL,NULL); }
0
[ "CWE-119", "CWE-787" ]
Espruino
0a7619875bf79877907205f6bee08465b89ff10b
262,165,791,072,776,600,000,000,000,000,000,000,000
3
Fix strncat/cpy bounding issues (fix #1425)
bool SockaddrTokLinuxSockaddrIn6(const struct sockaddr *input, socklen_t input_addrlen, klinux_sockaddr_in6 *output) { if (!input || !output || input_addrlen == 0 || input->sa_family != AF_INET6 || input_addrlen < sizeof(struct sockaddr_in6)) { ...
0
[ "CWE-787" ]
asylo
bda9772e7872b0d2b9bee32930cf7a4983837b39
254,111,083,881,611,370,000,000,000,000,000,000,000
21
Check input length in FromLinuxSockAddr PiperOrigin-RevId: 333785506 Change-Id: I1d68fb8954665eebc1018d80ff995cbe9e7ed6a9
void CSteamNetworkListenSocketDirectUDP::Received_ChallengeRequest( const CMsgSteamSockets_UDP_ChallengeRequest &msg, const netadr_t &adrFrom, SteamNetworkingMicroseconds usecNow ) { if ( msg.connection_id() == 0 ) { ReportBadPacket( "ChallengeRequest", "Missing connection_id." ); return; } //CSteamID steamIDCl...
0
[ "CWE-703" ]
GameNetworkingSockets
d944a10808891d202bb1d5e1998de6e0423af678
39,507,246,101,220,044,000,000,000,000,000,000,000
28
Tweak pointer math to avoid possible integer overflow
PHPAPI php_url *php_url_parse_ex(char const *str, int length) { char port_buf[6]; php_url *ret = ecalloc(1, sizeof(php_url)); char const *s, *e, *p, *pp, *ue; s = str; ue = s + length; /* parse scheme */ if ((e = memchr(s, ':', length)) && (e - s)) { /* validate scheme */ p = s; while (p < e) { /* sch...
0
[ "CWE-20" ]
php-src
b061fa909de77085d3822a89ab901b934d0362c4
314,800,423,490,906,430,000,000,000,000,000,000,000
252
Fix bug #73192
testframe_store(struct module_env* env, struct cachedb_env* cachedb_env, char* key, uint8_t* data, size_t data_len, time_t ATTR_UNUSED(ttl)) { struct testframe_moddata* d = (struct testframe_moddata*) cachedb_env->backend_data; (void)env; lock_basic_lock(&d->lock); verbose(VERB_ALGO, "testframe_store %s (%d byte...
0
[ "CWE-613", "CWE-703" ]
unbound
f6753a0f1018133df552347a199e0362fc1dac68
241,866,110,695,513,900,000,000,000,000,000,000,000
34
- Fix the novel ghost domain issues CVE-2022-30698 and CVE-2022-30699.
imapx_server_run_idle_thread_cb (gpointer user_data) { GWeakRef *is_weakref = user_data; CamelIMAPXServer *is; g_return_val_if_fail (is_weakref != NULL, FALSE); is = g_weak_ref_get (is_weakref); if (!is) return FALSE; g_mutex_lock (&is->priv->idle_lock); if (g_main_current_source () == is->priv->idle_pendi...
0
[]
evolution-data-server
f26a6f672096790d0bbd76903db4c9a2e44f116b
335,490,384,330,604,300,000,000,000,000,000,000,000
47
[IMAPx] 'STARTTLS not supported' error ignored When a user has setup the STARTTLS encryption method, but the server doesn't support it, then an error should be shown to the user, instead of using unsecure connection. There had been two bugs in the existing code which prevented this error from being used and the failur...
static int proc_SSID_open(struct inode *inode, struct file *file) { struct proc_data *data; struct proc_dir_entry *dp = PDE(inode); struct net_device *dev = dp->data; struct airo_info *ai = dev->ml_priv; int i; char *ptr; SsidRid SSID_rid; if ((file->private_data = kzalloc(sizeof(struct proc_data ), GFP_KERNEL...
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
14,041,325,956,805,026,000,000,000,000,000,000,000
44
net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared After the last patch, We are left in a state in which only drivers calling ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real hardware call ether_setup for their net_devices and don't hold any state in their skbs. There...
static struct dpp *dcn10_dpp_create( struct dc_context *ctx, uint32_t inst) { struct dcn10_dpp *dpp = kzalloc(sizeof(struct dcn10_dpp), GFP_KERNEL); if (!dpp) return NULL; dpp1_construct(dpp, ctx, inst, &tf_regs[inst], &tf_shift, &tf_mask); return &dpp->base; }
0
[ "CWE-400", "CWE-401" ]
linux
104c307147ad379617472dd91a5bcb368d72bd6d
245,661,635,095,421,960,000,000,000,000,000,000,000
14
drm/amd/display: prevent memory leak In dcn*_create_resource_pool the allocated memory should be released if construct pool fails. Reviewed-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
OPJ_BOOL opj_j2k_read_unk ( opj_j2k_t *p_j2k, opj_stream_private_t *p_stream, OPJ_UINT32 *output_marker, opj_event_mgr_t * p_manager ...
0
[]
openjpeg
0fa5a17c98c4b8f9ee2286f4f0a50cf52a5fccb0
44,520,344,248,708,550,000,000,000,000,000,000,000
61
[trunk] Correct potential double free on malloc failure in opj_j2k_copy_default_tcp_and_create_tcp (fixes issue 492)
uint32_t BinaryProtocolWriter::writeI64(int64_t i64) { out_.writeBE(i64); return sizeof(i64); }
0
[ "CWE-703", "CWE-770" ]
fbthrift
c9a903e5902834e95bbd4ab0e9fa53ba0189f351
159,918,278,307,621,480,000,000,000,000,000,000,000
4
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...
xmlTextReaderBuildMessage(const char *msg, va_list ap) { int size = 0; int chars; char *larger; char *str = NULL; va_list aq; while (1) { VA_COPY(aq, ap); chars = vsnprintf(str, size, msg, aq); va_end(aq); if (chars < 0) { xmlGenericError(xmlGenericErrorCont...
0
[ "CWE-399" ]
libxml2
213f1fe0d76d30eaed6e5853057defc43e6df2c9
215,375,057,715,834,000,000,000,000,000,000,000,000
34
CVE-2015-1819 Enforce the reader to run in constant memory One of the operation on the reader could resolve entities leading to the classic expansion issue. Make sure the buffer used for xmlreader operation is bounded. Introduce a new allocation type for the buffers for this effect.
TEST_F(QueryPlannerTest, CannotCompoundBoundsWhenSharedPrefixInsideElemMatchIsMultikey) { MultikeyPaths multikeyPaths{{0U, 1U}, {0U, 1U}}; addIndex(BSON("a.b.c" << 1 << "a.b.d" << 1), multikeyPaths); runQuery(fromjson("{a: {$elemMatch: {'b.c': 2, 'b.d': 3}}}")); assertNumSolutions(2U); assertSoluti...
0
[ "CWE-834" ]
mongo
94d0e046baa64d1aa1a6af97e2d19bb466cc1ff5
153,986,931,494,844,000,000,000,000,000,000,000,000
11
SERVER-38164 $or pushdown optimization does not correctly handle $not within an $elemMatch
parse_subexp(Node** top, OnigToken* tok, int term, UChar** src, UChar* end, ScanEnv* env) { int r; Node *node, **headp; *top = NULL; r = parse_branch(&node, tok, term, src, end, env); if (r < 0) { onig_node_free(node); return r; } if (r == term) { *top = node; } else if (r == TK_AL...
0
[ "CWE-125" ]
Onigmo
29e7e6aedebafd5efbbd90655c8e0d495035d7b4
64,223,894,998,208,850,000,000,000,000,000,000,000
46
bug: Fix out of bounds read Add boundary check before PFETCH. Based on the following commits on https://github.com/kkos/oniguruma , but not the same. * 68c395576813b3f9812427f94d272bcffaca316c * dc0a23eb16961f98d2a5a2128d18bd4602058a10 * 5186c7c706a7f280110e6a0b060f87d0f7d790ce * 562bf4825b301693180c674994bf708b28b0...
update_send_new_or_existing_notification_icons(rdpContext* context, const WINDOW_ORDER_INFO* orderInfo, const NOTIFY_ICON_STATE_ORDER* iconStateOrder) { wStream* s; rdpUpdate* update = context->update; BYTE controlFlags = O...
0
[ "CWE-125" ]
FreeRDP
f8890a645c221823ac133dbf991f8a65ae50d637
48,388,298,454,682,780,000,000,000,000,000,000,000
101
Fixed #6005: Bounds checks in update_read_bitmap_data
SWTPM_NVRAM_StoreData_Intern(const unsigned char *data, uint32_t length, uint32_t tpm_number, const char *name, TPM_BOOL encrypt /* encrypt if key is set */) { TPM_RESULT rc = 0; uint32...
0
[]
swtpm
2212f25466089937a0ef3f5d44507a2b157c12aa
327,954,894,625,700,470,000,000,000,000,000,000,000
121
swtpm: Use open() (not fopen()) when accessing statefile (CVE-2020-28407) This patch addresses CVE-2020-28407. Use the open() call rather than the fopen() call when accessing the statefile and make sure we do not follow symlinks using O_NOFOLLOW. The modification does not allow an attacker to create a symbolic link ...
psutil_net_if_addrs(PyObject *self, PyObject *args) { unsigned int i = 0; ULONG family; PCTSTR intRet; PCTSTR netmaskIntRet; char *ptr; char buff_addr[1024]; char buff_macaddr[1024]; char buff_netmask[1024]; DWORD dwRetVal = 0; #if (_WIN32_WINNT >= 0x0600) // Windows Vista and above ...
1
[ "CWE-415" ]
psutil
7d512c8e4442a896d56505be3e78f1156f443465
27,927,433,518,555,283,000,000,000,000,000,000,000
183
Use Py_CLEAR instead of Py_DECREF to also set the variable to NULL (#1616) These files contain loops that convert system data into python objects and during the process they create objects and dereference their refcounts after they have been added to the resulting list. However, in case of errors during the creat...
fuzzy_match_in_list( list_T *l, char_u *str, int matchseq, char_u *key, callback_T *item_cb, int retmatchpos, list_T *fmatchlist, long max_matches) { long len; fuzzyItem_T *items; listitem_T *li; long i = 0; long match_count = 0; int_u matches[MAX_FUZZY_MATCHES]; len = list_l...
0
[ "CWE-416" ]
vim
409510c588b1eec1ae33511ae97a21eb8e110895
146,229,757,399,980,210,000,000,000,000,000,000,000
175
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 int nfs_commit_unstable_pages(struct inode *inode, struct writeback_control *wbc) { return 0; }
0
[]
linux
c7559663e42f4294ffe31fe159da6b6a66b35d61
51,911,291,732,634,510,000,000,000,000,000,000,000
4
NFS: Allow nfs_updatepage to extend a write under additional circumstances Currently nfs_updatepage allows a write to be extended to cover a full page only if we don't have a byte range lock lock on the file... but if we have a write delegation on the file or if we have the whole file locked for writing then we should...
static void add_id_to_list(unsigned *head, unsigned short *list, unsigned short id) { list[id] = *head; *head = id; }
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
250,673,359,389,460,460,000,000,000,000,000,000,000
6
xen-netfront: restore __skb_queue_tail() positioning in xennet_get_responses() The commit referenced below moved the invocation past the "next" label, without any explanation. In fact this allows misbehaving backends undue control over the domain the frontend runs in, as earlier detected errors require the skb to not ...
zfs_znode_acl_version(znode_t *zp) { zfs_acl_phys_t acl_phys; if (zp->z_is_sa) return (ZFS_ACL_VERSION_FUID); else { int error; /* * Need to deal with a potential * race where zfs_sa_upgrade could cause * z_isa_sa to change. * * If the lookup fails then the state of z_is_sa should have * ch...
0
[ "CWE-200", "CWE-732" ]
zfs
716b53d0a14c72bda16c0872565dd1909757e73f
266,201,381,475,776,500,000,000,000,000,000,000,000
31
FreeBSD: Fix UNIX permissions checking Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10727
pdf14_cmap_separation_direct(frac all, gx_device_color * pdc, const gs_gstate * pgs, gx_device * dev, gs_color_select_t select) { int i, ncomps = dev->color_info.num_components; int num_spots = pdf14_get_num_spots(dev); bool additive = dev->color_info.polarity == GX_CINFO_POLARITY_ADDITIVE;...
0
[]
ghostpdl
c432131c3fdb2143e148e8ba88555f7f7a63b25e
235,585,587,043,462,300,000,000,000,000,000,000,000
60
Bug 699661: Avoid sharing pointers between pdf14 compositors If a copdevice is triggered when the pdf14 compositor is the device, we make a copy of the device, then throw an error because, by default we're only allowed to copy the device prototype - then freeing it calls the finalize, which frees several pointers shar...
void ff_rm_free_rmstream (RMStream *rms) { av_packet_unref(&rms->pkt); }
0
[ "CWE-399", "CWE-834" ]
FFmpeg
124eb202e70678539544f6268efc98131f19fa49
97,456,140,819,407,620,000,000,000,000,000,000,000
4
avformat/rmdec: Fix DoS due to lack of eof check Fixes: loop.ivr Found-by: Xiaohei and Wangchu from Alibaba Security Team Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
gx_default_get_alpha_bits(gx_device * dev, graphics_object_type type) { return (type == go_text ? dev->color_info.anti_alias.text_bits : dev->color_info.anti_alias.graphics_bits); }
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
280,443,389,576,919,900,000,000,000,000,000,000,000
5
Bug 699670: disallow copying of the epo device The erasepage optimisation (epo) subclass device shouldn't be allowed to be copied because the subclass private data, child and parent pointers end up being shared between the original device and the copy. Add an epo_finish_copydevice which NULLs the three offending poin...
void dcc_send_deinit(void) { dcc_queue_deinit(); dcc_unregister_type("SEND"); signal_remove("dcc destroyed", (SIGNAL_FUNC) sig_dcc_destroyed); signal_remove("dcc reply send pasv", (SIGNAL_FUNC) dcc_send_connect); command_unbind("dcc send", (SIGNAL_FUNC) cmd_dcc_send); }
0
[ "CWE-416" ]
irssi
43e44d553d44e313003cee87e6ea5e24d68b84a1
190,301,362,803,054,670,000,000,000,000,000,000,000
9
Merge branch 'security' into 'master' Security Closes GL#12, GL#13, GL#14, GL#15, GL#16 See merge request irssi/irssi!23
static int socket_open_listen(struct sockaddr_in *my_addr) { int server_fd, tmp; server_fd = socket(AF_INET,SOCK_STREAM,0); if (server_fd < 0) { perror ("socket"); return -1; } tmp = 1; if (setsockopt(server_fd, SOL_SOCKET, SO_REUSEADDR, &tmp, sizeof(tmp))) av_log(NULL,...
0
[ "CWE-119", "CWE-787" ]
FFmpeg
a5d25faa3f4b18dac737fdb35d0dd68eb0dc2156
201,961,347,396,328,140,000,000,000,000,000,000,000
37
ffserver: Check chunk size Fixes out of array access Fixes: poc_ffserver.py Found-by: Paul Cher <paulcher@icloud.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
void rdbRemoveTempFile(pid_t childpid, int from_signal) { char tmpfile[256]; char pid[32]; /* Generate temp rdb file name using aync-signal safe functions. */ int pid_len = ll2string(pid, sizeof(pid), childpid); strcpy(tmpfile, "temp-"); strncpy(tmpfile+5, pid, pid_len); strcpy(tmpfile+5+pi...
0
[ "CWE-190" ]
redis
a30d367a71b7017581cf1ca104242a3c644dec0f
202,195,305,964,242,960,000,000,000,000,000,000,000
20
Fix Integer overflow issue with intsets (CVE-2021-32687) The vulnerability involves changing the default set-max-intset-entries configuration parameter to a very large value and constructing specially crafted commands to manipulate sets
WandExport void DrawPathLineToHorizontalAbsolute(DrawingWand *wand, const double x) { assert(wand != (DrawingWand *) NULL); assert(wand->signature == MagickWandSignature); if (wand->debug != MagickFalse) (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name); DrawPathLineToHorizontal(wand,Abso...
0
[ "CWE-476" ]
ImageMagick
6ad5fc3c9b652eec27fc0b1a0817159f8547d5d9
339,528,473,895,616,760,000,000,000,000,000,000,000
9
https://github.com/ImageMagick/ImageMagick/issues/716
static ScreenCell *realloc_buffer(VTermScreen *screen, ScreenCell *buffer, int new_rows, int new_cols) { ScreenCell *new_buffer = vterm_allocator_malloc(screen->vt, sizeof(ScreenCell) * new_rows * new_cols); int row, col; for(row = 0; row < new_rows; row++) { for(col = 0; col < new_cols; col++) { Scree...
1
[ "CWE-476" ]
vim
cd929f7ba8cc5b6d6dcf35c8b34124e969fed6b8
109,156,798,231,433,930,000,000,000,000,000,000,000
23
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.
HandleMessage(HANDLE pipe, DWORD bytes, DWORD count, LPHANDLE events, undo_lists_t *lists) { DWORD read; union { message_header_t header; address_message_t address; route_message_t route; flush_neighbors_message_t flush_neighbors; block_dns_message_t block_dns; dn...
0
[ "CWE-415" ]
openvpn
1394192b210cb3c6624a7419bcf3ff966742e79b
151,468,602,697,154,900,000,000,000,000,000,000,000
79
Fix potential double-free() in Interactive Service (CVE-2018-9336) Malformed input data on the service pipe towards the OpenVPN interactive service (normally used by the OpenVPN GUI to request openvpn instances from the service) can result in a double free() in the error handling code. This usually only leads to a pr...
access_check(i_ctx_t *i_ctx_p, int access, /* mask for attrs */ bool modify) /* if true, reduce access */ { os_ptr op = osp; ref *aop; switch (r_type(op)) { case t_dictionary: aop = dict_access_ref(op); if (modify) { if ...
0
[]
ghostpdl
0edd3d6c634a577db261615a9dc2719bca7f6e01
338,474,229,679,477,530,000,000,000,000,000,000,000
41
Bug 699659: Don't just assume an object is a t_(a)struct
static ssize_t uvesafb_show_product_rev(struct device *dev, struct device_attribute *attr, char *buf) { struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); struct uvesafb_par *par = info->par; if (par->vbe_ib.oem_product_rev_ptr) return snprintf(buf, PAGE_SIZE, "%s\n", (char *) (&par->vbe_i...
0
[ "CWE-190" ]
linux
9f645bcc566a1e9f921bdae7528a01ced5bc3713
96,443,584,031,553,730,000,000,000,000,000,000,000
12
video: uvesafb: Fix integer overflow in allocation cmap->len can get close to INT_MAX/2, allowing for an integer overflow in allocation. This uses kmalloc_array() instead to catch the condition. Reported-by: Dr Silvio Cesare of InfoSect <silvio.cesare@gmail.com> Fixes: 8bdb3a2d7df48 ("uvesafb: the driver core") Cc: s...
Opal::Call::OnHold (OpalConnection & /*connection*/, bool /*from_remote*/, bool on_hold) { if (on_hold) Ekiga::Runtime::run_in_main (boost::bind (&Opal::Call::emit_held_in_main, this)); else Ekiga::Runtime::run_in_main (boost::bind (&Opal::Call::emit_retrieved_in_main...
0
[]
ekiga
7d09807257963a4f5168a01aec1795a398746372
93,925,013,025,246,630,000,000,000,000,000,000,000
9
Validate UTF-8 strings before showing them Closes bug #653009.
static inline void strcpy_gmt(char *ubuf, time_t *when) /* {{{ */ { char buf[MAX_STR]; struct tm tm, *res; int n; res = php_gmtime_r(when, &tm); if (!res) { ubuf[0] = '\0'; return; } n = slprintf(buf, sizeof(buf), "%s, %02d %s %d %02d:%02d:%02d GMT", /* SAFE */ week_days[tm.tm_wday], tm.tm_mday, m...
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
310,054,423,708,657,600,000,000,000,000,000,000,000
21
Strict session