func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
off_t PackLinuxElf64::pack3(OutputFile *fo, Filter &ft) { off_t flen = super::pack3(fo, ft); // loader follows compressed PT_LOADs // NOTE: PackLinuxElf::pack3 adjusted xct_off for the extra page unsigned v_hole = sz_pack2 + lsize; set_te64(&elfout.phdr[C_TEXT].p_filesz, v_hole); set_te64(&elfout...
0
[ "CWE-476", "CWE-415" ]
upx
90279abdfcd235172eab99651043051188938dcc
187,952,962,006,738,400,000,000,000,000,000,000,000
130
PackLinuxElf::canUnpack must checkEhdr() for ELF input https://github.com/upx/upx/issues/485 modified: p_lx_elf.cpp
static int lg_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) { struct lg_drv_data *drv_data = hid_get_drvdata(hdev); if ((drv_data->quirks & LG_INVERT_HWHEEL) && usage->code == REL_HWHEEL) { input_event(field->hidinput->input, usage->type, usage->code, -value); ...
0
[ "CWE-119", "CWE-787" ]
linux
4ab25786c87eb20857bbb715c3ae34ec8fd6a214
229,297,138,689,968,200,000,000,000,000,000,000,000
16
HID: fix a couple of off-by-ones There are a few very theoretical off-by-one bugs in report descriptor size checking when performing a pre-parsing fixup. Fix those. Cc: stable@vger.kernel.org Reported-by: Ben Hawkes <hawkes@google.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jir...
static inline enum zone_type page_zonenum(const struct page *page) { return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK; }
0
[ "CWE-119" ]
linux
1be7107fbe18eed3e319a6c3e83c78254b693acb
273,717,057,005,045,580,000,000,000,000,000,000,000
4
mm: larger stack guard gap, between vmas Stack guard page is a useful feature to reduce a risk of stack smashing into a different mapping. We have been using a single page gap which is sufficient to prevent having stack adjacent to a different mapping. But this seems to be insufficient in the light of the stack usage ...
static inline int mailimf_wsp_parse(const char * message, size_t length, size_t * indx) { size_t cur_token; cur_token = * indx; if (cur_token >= length) return MAILIMF_ERROR_PARSE; if ((message[cur_token] != ' ') && (message[cur_token] != '\t')) return MAILIMF_ERROR_PARSE; cur_token ++; ...
0
[ "CWE-476" ]
libetpan
1fe8fbc032ccda1db9af66d93016b49c16c1f22d
8,035,015,483,215,344,000,000,000,000,000,000,000
18
Fixed crash #274
static void fbo_close(struct tcmu_device *dev) { struct fbo_state *state = tcmu_get_dev_private(dev); close(state->fd); free(state); }
0
[ "CWE-200" ]
tcmu-runner
8cf8208775022301adaa59c240bb7f93742d1329
328,366,693,115,509,000,000,000,000,000,000,000,000
7
removed all check_config callback implementations to avoid security issues see github issue #194 qcow.c contained an information leak, could test for existance of any file in the system file_example.c and file_optical.c allow also to test for existance of any file, plus to temporarily create empty new files anywhere...
gst_asf_demux_get_gst_tag_from_tag_name (const gchar * name_utf8) { const struct { const gchar *asf_name; const gchar *gst_name; } tags[] = { { "WM/Genre", GST_TAG_GENRE}, { "WM/AlbumTitle", GST_TAG_ALBUM}, { "WM/AlbumArtist", GST_TAG_ARTIST}, { "WM/Picture", GST_TAG_IMAGE}, { "WM/...
0
[ "CWE-125", "CWE-787" ]
gst-plugins-ugly
d21017b52a585f145e8d62781bcc1c5fefc7ee37
309,388,332,738,213,520,000,000,000,000,000,000,000
36
asfdemux: Check that we have enough data available before parsing bool/uint extended content descriptors https://bugzilla.gnome.org/show_bug.cgi?id=777955
static void bind_fetch(int row_count) { MYSQL_STMT *stmt; int rc, i, count= row_count; int32 data[10]; int8 i8_data; int16 i16_data; int32 i32_data; longlong i64_data; float f_data; double d_data; char s_data[10]; ulong length...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
175,010,706,201,107,730,000,000,000,000,000,000,000
155
WL#6791 : Redefine client --ssl option to imply enforced encryption # Changed the meaning of the --ssl=1 option of all client binaries to mean force ssl, not try ssl and fail over to eunecrypted # Added a new MYSQL_OPT_SSL_ENFORCE mysql_options() option to specify that an ssl connection is required. # Added a new macr...
static int armv8pmu_get_event_idx(struct pmu_hw_events *cpuc, struct hw_perf_event *event) { int idx; unsigned long evtype = event->config_base & ARMV8_EVTYPE_EVENT; /* Always place a cycle counter into the cycle counter. */ if (evtype == ARMV8_PMUV3_PERFCTR_CLOCK_CYCLES) { if (test_and_set_bit(ARMV8_IDX_C...
0
[ "CWE-284", "CWE-264" ]
linux
8fff105e13041e49b82f92eef034f363a6b1c071
286,338,483,208,071,500,000,000,000,000,000,000,000
26
arm64: perf: reject groups spanning multiple HW PMUs The perf core implicitly rejects events spanning multiple HW PMUs, as in these cases the event->ctx will differ. However this validation is performed after pmu::event_init() is called in perf_init_event(), and thus pmu::event_init() may be called with a group leader...
} void dump_hevc_track_info(GF_ISOFile *file, u32 trackNum, GF_HEVCConfig *hevccfg #if !defined(GPAC_DISABLE_AV_PARSERS) && !defined(GPAC_DISABLE_HEVC) , HEVCState *hevc_state #endif /*GPAC_DISABLE_AV_PARSERS && defined(GPAC_DISABLE_HEVC)*/ ) { #if !defined(GPAC_DISABLE_AV_PARSERS) && !defined(GPAC_DISABLE_HEVC) u...
0
[ "CWE-476" ]
gpac
ce01bd15f711d4575b7424b54b3a395ec64c1784
174,340,170,124,960,200,000,000,000,000,000,000,000
86
fixed #1566
pdf14_push_transparency_group(pdf14_ctx *ctx, gs_int_rect *rect, bool isolated, bool knockout, byte alpha, byte shape, gs_blend_mode_t blend_mode, bool idle, uint mask_id, int numcomps, bool cm_back_drop, ...
0
[ "CWE-416" ]
ghostpdl
90fd0c7ca3efc1ddff64a86f4104b13b3ac969eb
200,857,153,756,096,760,000,000,000,000,000,000,000
142
Bug 697456. Dont create new ctx when pdf14 device reenabled This bug had yet another weird case where the user created a file that pushed the pdf14 device twice. We were in that case, creating a new ctx and blowing away the original one with out proper clean up. To avoid, only create a new one when we need it.
reset_stats( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { struct reset_flags *rflags; u_long flags; struct reset_entry *rent; if (INFO_NITEMS(inpkt->err_nitems) > 1) { msyslog(LOG_ERR, "reset_stats: err_nitems > 1"); req_ack(srcadr, inter, inpkt, INFO_ERR_FMT); return; } rflags = (struc...
0
[ "CWE-190" ]
ntp
c04c3d3d940dfe1a53132925c4f51aef017d2e0f
229,145,460,750,319,980,000,000,000,000,000,000,000
32
[TALOS-CAN-0052] crash by loop counter underrun.
mrb_mruby_fiber_gem_init(mrb_state* mrb) { struct RClass *c; c = mrb_define_class(mrb, "Fiber", mrb->object_class); MRB_SET_INSTANCE_TT(c, MRB_TT_FIBER); mrb_define_method(mrb, c, "initialize", fiber_init, MRB_ARGS_NONE()|MRB_ARGS_BLOCK()); mrb_define_method(mrb, c, "resume", fiber_resume, MRB_ARGS_...
0
[ "CWE-476", "CWE-703" ]
mruby
da48e7dbb20024c198493b8724adae1b842083aa
99,558,038,778,858,300,000,000,000,000,000,000,000
18
fiber.c: should pack 15+ arguments in an array.
static void dwc3_clear_stall_all_ep(struct dwc3 *dwc) { u32 epnum; for (epnum = 1; epnum < DWC3_ENDPOINTS_NUM; epnum++) { struct dwc3_ep *dep; int ret; dep = dwc->eps[epnum]; if (!dep) continue; if (!(dep->flags & DWC3_EP_STALL)) continue; dep->flags &= ~DWC3_EP_STALL; ret = dwc3_send_clear_s...
0
[ "CWE-703", "CWE-667", "CWE-189" ]
linux
c91815b596245fd7da349ecc43c8def670d2269e
187,916,564,533,942,850,000,000,000,000,000,000,000
21
usb: dwc3: gadget: never call ->complete() from ->ep_queue() This is a requirement which has always existed but, somehow, wasn't reflected in the documentation and problems weren't found until now when Tuba Yavuz found a possible deadlock happening between dwc3 and f_hid. She described the situation as follows: spin_...
static void __io_put_task(struct task_struct *task, int nr) { struct io_uring_task *tctx = task->io_uring; percpu_counter_sub(&tctx->inflight, nr); if (unlikely(atomic_read(&tctx->in_idle))) wake_up(&tctx->wait); put_task_struct_many(task, nr); }
0
[ "CWE-416" ]
linux
9cae36a094e7e9d6e5fe8b6dcd4642138b3eb0c7
299,634,527,495,837,700,000,000,000,000,000,000,000
9
io_uring: reinstate the inflight tracking After some debugging, it was realized that we really do still need the old inflight tracking for any file type that has io_uring_fops assigned. If we don't, then trivial circular references will mean that we never get the ctx cleaned up and hence it'll leak. Just bring back t...
void IOBuf::freeInternalBuf(void* /* buf */, void* userData) noexcept { auto storage = static_cast<HeapStorage*>(userData); releaseStorage(storage, kDataInUse); }
0
[ "CWE-787" ]
folly
4f304af1411e68851bdd00ef6140e9de4616f7d3
213,578,673,032,912,460,000,000,000,000,000,000,000
4
[folly] Add additional overflow checks to IOBuf - CVE-2021-24036 Summary: As per title CVE-2021-24036 Reviewed By: jan Differential Revision: D27938605 fbshipit-source-id: 7481c54ae6fbb7b67b15b3631d5357c2f7043f9c
void __fastcall TCustomDialog::AddImage(const UnicodeString & ImageName) { TImage * Image = new TImage(this); Image->Name = L"Image"; Image->Parent = GetDefaultParent(); LoadDialogImage(Image, ImageName); Image->SetBounds(FIndent, FPos + ScaleByTextHeight(this, 3), Image->Picture->Width, Image->Picture-...
0
[ "CWE-787" ]
winscp
faa96e8144e6925a380f94a97aa382c9427f688d
15,173,976,393,599,840,000,000,000,000,000,000,000
9
Bug 1943: Prevent loading session settings that can lead to remote code execution from handled URLs https://winscp.net/tracker/1943 (cherry picked from commit ec584f5189a856cd79509f754722a6898045c5e0) Source commit: 0f4be408b3f01132b00682da72d925d6c4ee649b
paste_from_archive_list_ready_cb (GObject *source_object, GAsyncResult *result, gpointer user_data) { FrWindow *window = user_data; GError *error = NULL; if (! fr_archive_operation_finish (FR_ARCHIVE (source_object), result, &error)) { _paste_from_archive_operation_completed (window, FR_AC...
0
[ "CWE-22" ]
file-roller
b147281293a8307808475e102a14857055f81631
284,241,320,613,075,640,000,000,000,000,000,000,000
26
libarchive: sanitize filenames before extracting
int hllSparseToDense(robj *o) { sds sparse = o->ptr, dense; struct hllhdr *hdr, *oldhdr = (struct hllhdr*)sparse; int idx = 0, runlen, regval; uint8_t *p = (uint8_t*)sparse, *end = p+sdslen(sparse); /* If the representation is already the right one return ASAP. */ hdr = (struct hllhdr*) sparse;...
1
[ "CWE-787" ]
redis
9f13b2bd4967334b1701c6eccdf53760cb13f79e
61,941,181,118,489,350,000,000,000,000,000,000,000
53
Fix hyperloglog corruption
crypt_status_info crypt_status(struct crypt_device *cd, const char *name) { int r; if (!name) return CRYPT_INVALID; if (!cd) dm_backend_init(cd); r = dm_status_device(cd, name); if (!cd) dm_backend_exit(cd); if (r < 0 && r != -ENODEV) return CRYPT_INVALID; if (r == 0) return CRYPT_ACTIVE; if (r...
0
[ "CWE-345" ]
cryptsetup
0113ac2d889c5322659ad0596d4cfc6da53e356c
144,325,626,837,206,830,000,000,000,000,000,000,000
26
Fix CVE-2021-4122 - LUKS2 reencryption crash recovery attack Fix possible attacks against data confidentiality through LUKS2 online reencryption extension crash recovery. An attacker can modify on-disk metadata to simulate decryption in progress with crashed (unfinished) reencryption step and persistently decrypt par...
_XimClose( Xim im) { CARD32 buf32[BUFSIZE/4]; CARD8 *buf = (CARD8 *)buf32; CARD16 *buf_s = (CARD16 *)&buf[XIM_HEADER_SIZE]; INT16 len; CARD32 reply32[BUFSIZE/4]; char *reply = (char *)reply32; XPointer preply; int buf_size; int ret_code; if (!IS_SERVER_CONNECTED(im...
0
[ "CWE-190" ]
libx11
1a566c9e00e5f35c1f9e7f3d741a02e5170852b2
271,519,531,237,690,370,000,000,000,000,000,000,000
56
Zero out buffers in functions It looks like uninitialized stack or heap memory can leak out via padding bytes. Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Matthieu Herrb <matthieu@herrb.eu>
get_clkbug_info( sockaddr_u *srcadr, endpt *inter, struct req_pkt *inpkt ) { register int i; register struct info_clkbug *ic; register u_int32 *clkaddr; register int items; struct refclockbug bug; sockaddr_u addr; ZERO_SOCK(&addr); AF(&addr) = AF_INET; #ifdef ISC_PLATFORM_HAVESALEN addr.sa.sa_len = SOCKLE...
1
[ "CWE-476" ]
ntp
8a0c765f3c47633fa262356b0818788d1cf249b1
329,243,862,618,845,260,000,000,000,000,000,000,000
62
[Bug 2939] reslist NULL pointer dereference [Bug 2940] Stack exhaustion in recursive traversal of restriction list -- these two where fixed together --
void fxInt16Setter(txMachine* the, txSlot* data, txInteger offset, txSlot* slot, int endian) { txS2 value = (txS2)slot->value.integer; #ifdef mxMisalignedSettersCrash value = EXPORT(S16); c_memcpy(data->value.arrayBuffer.address + offset, &value, sizeof(txS2)); #else *((txS2*)(data->value.arrayBuffer.address + offs...
0
[ "CWE-125" ]
moddable
135aa9a4a6a9b49b60aa730ebc3bcc6247d75c45
38,128,581,890,705,310,000,000,000,000,000,000,000
11
XS: #896
static void analyze_sbs(struct mddev *mddev) { int i; struct md_rdev *rdev, *freshest, *tmp; char b[BDEVNAME_SIZE]; freshest = NULL; rdev_for_each_safe(rdev, tmp, mddev) switch (super_types[mddev->major_version]. load_super(rdev, freshest, mddev->minor_version)) { case 1: freshest = rdev; break; ca...
0
[ "CWE-200" ]
linux
b6878d9e03043695dbf3fa1caa6dfc09db225b16
286,390,739,771,931,900,000,000,000,000,000,000,000
66
md: use kzalloc() when bitmap is disabled In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a mdu_bitmap_file_t called "file". 5769 file = kmalloc(sizeof(*file), GFP_NOIO); 5770 if (!file) 5771 return -ENOMEM; This structure is copied to user space at the end of the fun...
point_send(PG_FUNCTION_ARGS) { Point *pt = PG_GETARG_POINT_P(0); StringInfoData buf; pq_begintypsend(&buf); pq_sendfloat8(&buf, pt->x); pq_sendfloat8(&buf, pt->y); PG_RETURN_BYTEA_P(pq_endtypsend(&buf)); }
0
[ "CWE-703", "CWE-189" ]
postgres
31400a673325147e1205326008e32135a78b4d8a
213,734,606,258,790,260,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...
int SSL_CTX_get_ex_new_index(long argl,void *argp,CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func,CRYPTO_EX_free *free_func) { return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_SSL_CTX, argl, argp, new_func, dup_func, free_func); }
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
157,526,572,049,821,860,000,000,000,000,000,000,000
6
Add Next Protocol Negotiation.
download_requested_dialog_response_cb (GtkDialog *dialog, int response_id, WebKitDownload *download) { if (response_id == GTK_RESPONSE_ACCEPT) { DownloaderView *dview; char *uri; uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER...
0
[]
epiphany
3e0f7dea754381c5ad11a06ccc62eb153382b498
231,840,181,564,892,400,000,000,000,000,000,000,000
23
Report broken certs through the padlock icon This uses a new feature in libsoup that reports through a SoupMessageFlag whether the message is talking to a server that has a trusted server. Bug #600663
ecma_string_trim_helper (const lit_utf8_byte_t **utf8_str_p, /**< [in, out] current string position */ lit_utf8_size_t *utf8_str_size) /**< [in, out] size of the given string */ { const lit_utf8_byte_t *end_p = *utf8_str_p + *utf8_str_size; const lit_utf8_byte_t *start_p = *utf8_str_p; ...
0
[ "CWE-416" ]
jerryscript
3bcd48f72d4af01d1304b754ef19fe1a02c96049
162,599,967,399,551,300,000,000,000,000,000,000,000
12
Improve parse_identifier (#4691) Ascii string length is no longer computed during string allocation. JerryScript-DCO-1.0-Signed-off-by: Daniel Batiz batizjob@gmail.com
static void mptsas_diag_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { MPTSASState *s = opaque; trace_mptsas_diag_write(s, addr, val); }
0
[ "CWE-416" ]
qemu
3791642c8d60029adf9b00bcb4e34d7d8a1aea4d
173,694,982,961,599,300,000,000,000,000,000,000,000
6
mptsas: Remove unused MPTSASState 'pending' field (CVE-2021-3392) While processing SCSI i/o requests in mptsas_process_scsi_io_request(), the Megaraid emulator appends new MPTSASRequest object 'req' to the 's->pending' queue. In case of an error, this same object gets dequeued in mptsas_free_request() only if SCSIRequ...
int enc_untrusted_pipe2(int pipefd[2], int flags) { if (flags & ~(O_CLOEXEC | O_DIRECT | O_NONBLOCK)) { errno = EINVAL; return -1; } return EnsureInitializedAndDispatchSyscall( asylo::system_call::kSYS_pipe2, pipefd, TokLinuxFileStatusFlag(flags)); }
0
[ "CWE-125" ]
asylo
b1d120a2c7d7446d2cc58d517e20a1b184b82200
28,767,290,455,608,028,000,000,000,000,000,000,000
9
Check for return size in enc_untrusted_read Check return size does not exceed requested. The returned result and content still cannot be trusted, but it's expected behavior when not using a secure file system. PiperOrigin-RevId: 333827386 Change-Id: I0bdec0aec9356ea333dc8c647eba5d2772875f29
u32 parse_dashlive(char *arg, char *arg_val, u32 opt) { dash_mode = opt ? GF_DASH_DYNAMIC_DEBUG : GF_DASH_DYNAMIC; dash_live = 1; if (arg[10] == '=') { dash_ctx_file = arg + 11; } dash_duration = atof(arg_val); return 0; }
0
[ "CWE-476" ]
gpac
87afe070cd6866df7fe80f11b26ef75161de85e0
5,364,245,157,305,020,000,000,000,000,000,000,000
10
fixed #1734
file_truncate (struct rw *rw, int64_t size) { struct rw_file *rwf = (struct rw_file *) rw; /* If the destination is an ordinary file then the original file * size doesn't matter. Truncate it to the source size. But * truncate it to zero first so the file is completely empty and * sparse. */ if (rwf...
0
[ "CWE-252" ]
libnbd
8d444b41d09a700c7ee6f9182a649f3f2d325abb
129,365,804,079,674,730,000,000,000,000,000,000,000
22
copy: CVE-2022-0485: Fail nbdcopy if NBD read or write fails nbdcopy has a nasty bug when performing multi-threaded copies using asynchronous nbd calls - it was blindly treating the completion of an asynchronous command as successful, rather than checking the *error parameter. This can result in the silent creation o...
static inline unsigned long _task_util_est(struct task_struct *p) { struct util_est ue = READ_ONCE(p->se.avg.util_est); return (max(ue.ewma, ue.enqueued) | UTIL_AVG_UNCHANGED); }
0
[ "CWE-400", "CWE-703", "CWE-835" ]
linux
c40f7d74c741a907cfaeb73a7697081881c497d0
33,007,127,943,833,740,000,000,000,000,000,000,000
6
sched/fair: Fix infinite loop in update_blocked_averages() by reverting a9e7f6544b9c Zhipeng Xie, Xie XiuQi and Sargun Dhillon reported lockups in the scheduler under high loads, starting at around the v4.18 time frame, and Zhipeng Xie tracked it down to bugs in the rq->leaf_cfs_rq_list manipulation. Do a (manual) re...
static int handle_incoming_queue(struct netfront_queue *queue, struct sk_buff_head *rxq) { struct netfront_stats *rx_stats = this_cpu_ptr(queue->info->rx_stats); int packets_dropped = 0; struct sk_buff *skb; while ((skb = __skb_dequeue(rxq)) != NULL) { int pull_to = NETFRONT_SKB_CB(skb)->pull_to; if (pul...
0
[]
linux
f63c2c2032c2e3caad9add3b82cc6e91c376fd26
40,491,705,797,475,110,000,000,000,000,000,000,000
35
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 ...
int select_compression_request_header(struct session *s, struct buffer *req) { struct http_txn *txn = &s->txn; struct http_msg *msg = &txn->req; struct hdr_ctx ctx; struct comp_algo *comp_algo = NULL; struct comp_algo *comp_algo_back = NULL; /* Disable compression for older user agents announcing themselves as "...
0
[]
haproxy
aae75e3279c6c9bd136413a72dafdcd4986bb89a
194,782,781,172,889,740,000,000,000,000,000,000,000
62
BUG/CRITICAL: using HTTP information in tcp-request content may crash the process During normal HTTP request processing, request buffers are realigned if there are less than global.maxrewrite bytes available after them, in order to leave enough room for rewriting headers after the request. This is done in http_wait_fo...
int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry, struct inode **delegated_inode) { struct inode *inode = old_dentry->d_inode; unsigned max_links = dir->i_sb->s_max_links; int error; if (!inode) return -ENOENT; error = may_create(dir, new_dentry); if (error) return error;...
0
[ "CWE-416" ]
linux
f15133df088ecadd141ea1907f2c96df67c729f0
207,295,833,490,218,240,000,000,000,000,000,000,000
52
path_openat(): fix double fput() path_openat() jumps to the wrong place after do_tmpfile() - it has already done path_cleanup() (as part of path_lookupat() called by do_tmpfile()), so doing that again can lead to double fput(). Cc: stable@vger.kernel.org # v3.11+ Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
int sock_create_kern(int family, int type, int protocol, struct socket **res) { return __sock_create(&init_net, family, type, protocol, res, 1); }
0
[ "CWE-264" ]
net
4de930efc23b92ddf88ce91c405ee645fe6e27ea
283,776,425,088,374,060,000,000,000,000,000,000,000
4
net: validate the range we feed to iov_iter_init() in sys_sendto/sys_recvfrom Cc: stable@vger.kernel.org # v3.19 Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
int xml_complete(modsec_rec *msr, char **error_msg) { if (error_msg == NULL) return -1; *error_msg = NULL; /* Only if we have a context, meaning we've done some work. */ if (msr->xml->parsing_ctx != NULL) { /* This is how we signalise the end of parsing to libxml. */ xmlParseChunk(msr->...
0
[ "CWE-20", "CWE-611" ]
ModSecurity
d4d80b38aa85eccb26e3c61b04d16e8ca5de76fe
193,729,920,373,243,200,000,000,000,000,000,000,000
26
Added SecXmlExternalEntity
getfs_by_devdir (const char *dev, const char *dir) { struct mntentchn *mc, *mc0; mc0 = fstab_head(); for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt) { int ok = 1; /* dir */ if (!streq(mc->m.mnt_dir, dir)) { char *dr = canonicalize(mc->m.mnt_dir); ok = streq(dr, dir); my_free(dr); } /* spec ...
0
[ "CWE-399" ]
util-linux
4b39b6aefd5dd8ac68a92adc650dc13d5d54d704
41,039,945,588,463,075,000,000,000,000,000,000,000
35
mount: use fflush() and temporary file for mtab updates (CVE-2011-1089) http://thread.gmane.org/gmane.comp.security.oss.general/4374 Changes: - force mount(8) to use /etc/mtab.tmp file every time. The original code used the tmp file for remount/move operations only. - call and check fflush() return code for...
static void hns_rcb_set_port_timeout( struct rcb_common_cb *rcb_common, u32 port_idx, u32 timeout) { if (AE_IS_VER1(rcb_common->dsaf_dev->dsaf_ver)) { dsaf_write_dev(rcb_common, RCB_CFG_OVERTIME_REG, timeout * HNS_RCB_CLK_FREQ_MHZ); } else if (!HNS_DSAF_IS_DEBUG(rcb_common->dsaf_dev)) { if (timeout > H...
0
[ "CWE-119", "CWE-703" ]
linux
412b65d15a7f8a93794653968308fc100f2aa87c
938,362,013,755,591,800,000,000,000,000,000,000
25
net: hns: fix ethtool_get_strings overflow in hns driver hns_get_sset_count() returns HNS_NET_STATS_CNT and the data space allocated is not enough for ethtool_get_strings(), which will cause random memory corruption. When SLAB and DEBUG_SLAB are both enabled, memory corruptions like the the following can be observed ...
*/ PHPAPI void php_print_info_htmlhead(TSRMLS_D) { php_info_print("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n"); php_info_print("<html xmlns=\"http://www.w3.org/1999/xhtml\">"); php_info_print("<head>\n"); php_info_print_style(TSRMLS_C); php_info_print("<ti...
0
[ "CWE-200" ]
php-src
3804c0d00fa6e629173fb1c8c61f8f88d5fe39b9
234,113,185,692,034,430,000,000,000,000,000,000,000
11
Fix bug #67498 - phpinfo() Type Confusion Information Leak Vulnerability
asmlinkage long sys_reboot(int magic1, int magic2, unsigned int cmd, void __user * arg) { char buffer[256]; /* We only trust the superuser with rebooting the system. */ if (!capable(CAP_SYS_BOOT)) return -EPERM; /* For safety, we require "magic" arguments. */ if (magic1 != LINUX_REBOOT_MAGIC1 || (magic2 !...
0
[ "CWE-20" ]
linux-2.6
9926e4c74300c4b31dee007298c6475d33369df0
173,489,383,013,473,050,000,000,000,000,000,000,000
79
CPU time limit patch / setrlimit(RLIMIT_CPU, 0) cheat fix As discovered here today, the change in Kernel 2.6.17 intended to inhibit users from setting RLIMIT_CPU to 0 (as that is equivalent to unlimited) by "cheating" and setting it to 1 in such a case, does not make a difference, as the check is done in the wrong pla...
\param user_path Specified path, or \c 0 to get the path currently used. \param reinit_path Force path to be recalculated (may take some time). \return Path containing the \c ffmpeg binary. **/ inline const char *ffmpeg_path(const char *const user_path, const bool reinit_path) { static CImg<char>...
0
[ "CWE-125" ]
CImg
10af1e8c1ad2a58a0a3342a856bae63e8f257abb
250,150,337,487,254,300,000,000,000,000,000,000,000
29
Fix other issues in 'CImg<T>::load_bmp()'.
static void vhost_flush_work(struct vhost_work *work) { struct vhost_flush_struct *s; s = container_of(work, struct vhost_flush_struct, work); complete(&s->wait_event); }
0
[ "CWE-120" ]
linux
060423bfdee3f8bc6e2c1bac97de24d5415e2bc4
98,542,426,921,188,180,000,000,000,000,000,000,000
7
vhost: make sure log_num < in_num The code assumes log_num < in_num everywhere, and that is true as long as in_num is incremented by descriptor iov count, and log_num by 1. However this breaks if there's a zero sized descriptor. As a result, if a malicious guest creates a vring desc with desc.len = 0, it may cause th...
u32 svm_msrpm_offset(u32 msr) { u32 offset; int i; for (i = 0; i < NUM_MSR_MAPS; i++) { if (msr < msrpm_ranges[i] || msr >= msrpm_ranges[i] + MSRS_IN_RANGE) continue; offset = (msr - msrpm_ranges[i]) / 4; /* 4 msrs per u8 */ offset += (i * MSRS_RANGE_SIZE); /* add range offset */ /* Now we...
0
[ "CWE-835" ]
linux
e72436bc3a5206f95bb384e741154166ddb3202e
51,727,428,998,082,320,000,000,000,000,000,000,000
20
KVM: SVM: avoid infinite loop on NPF from bad address When a nested page fault is taken from an address that does not have a memslot associated to it, kvm_mmu_do_page_fault returns RET_PF_EMULATE (via mmu_set_spte) and kvm_mmu_page_fault then invokes svm_need_emulation_on_page_fault. The default answer there is to re...
static void h2_wake_some_streams(struct h2c *h2c, int last, uint32_t flags) { struct eb32_node *node; struct h2s *h2s; if (h2c->st0 >= H2_CS_ERROR || h2c->conn->flags & CO_FL_ERROR) flags |= CS_FL_ERR_PENDING; if (conn_xprt_read0_pending(h2c->conn)) flags |= CS_FL_REOS; node = eb32_lookup_ge(&h2c->streams_b...
0
[ "CWE-125" ]
haproxy
a01f45e3ced23c799f6e78b5efdbd32198a75354
80,917,759,821,681,600,000,000,000,000,000,000,000
38
BUG/CRITICAL: mux-h2: re-check the frame length when PRIORITY is used Tim D�sterhus reported a possible crash in the H2 HEADERS frame decoder when the PRIORITY flag is present. A check is missing to ensure the 5 extra bytes needed with this flag are actually part of the frame. As per RFC7540#4.2, let's return a connec...
gpk_build_pin_apdu(sc_card_t *card, sc_apdu_t *apdu, struct sc_pin_cmd_data *data) { static u8 sbuf[8]; int r; if (data->pin_type != SC_AC_CHV) return SC_ERROR_INVALID_ARGUMENTS; /* XXX deal with secure messaging here */ memset(apdu, 0, sizeof(*apdu)); apdu->cse = SC_APDU_CASE_3_SHORT; data->flags |= SC_PI...
0
[ "CWE-125" ]
OpenSC
8fe377e93b4b56060e5bbfb6f3142ceaeca744fa
274,378,166,892,329,870,000,000,000,000,000,000,000
59
fixed out of bounds reads Thanks to Eric Sesterhenn from X41 D-SEC GmbH for reporting and suggesting security fixes.
crypt_pw_enc(const char *pwd) { return crypt_pw_enc_by_hash(pwd, CRYPT_UNIX); }
0
[ "CWE-284" ]
389-ds-base
aeb90eb0c41fc48541d983f323c627b2e6c328c7
173,759,437,276,223,900,000,000,000,000,000,000,000
4
Issue 4817 - BUG - locked crypt accounts on import may allow all passwords (#4819) Bug Description: Due to mishanding of short dbpwd hashes, the crypt_r algorithm was misused and was only comparing salts in some cases, rather than checking the actual content of the password. Fix Description: Stricter checks on d...
contentProcessor(XML_Parser parser, const char *start, const char *end, const char **endPtr) { enum XML_Error result = doContent( parser, 0, parser->m_encoding, start, end, endPtr, (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT); if (result == XML_ERROR_NONE) { ...
0
[ "CWE-400", "CWE-703" ]
libexpat
9b4ce651b26557f16103c3a366c91934ecd439ab
310,846,433,060,961,230,000,000,000,000,000,000,000
11
Prevent stack exhaustion in build_model It is possible to trigger stack exhaustion in build_model function if depth of nested children in DTD element is large enough. This happens because build_node is a recursively called function within build_model. The code has been adjusted to run iteratively. It uses the already...
int tls1_enc(SSL *s, int send) { SSL3_RECORD *rec; EVP_CIPHER_CTX *ds; unsigned long l; int bs,i,j,k,pad=0,ret,mac_size=0; int n; const EVP_CIPHER *enc; if (send) { if (EVP_MD_CTX_md(s->write_hash)) { n=EVP_MD_CTX_size(s->write_hash); OPENSSL_assert(n >= 0); } ds=s->enc_write_ctx; rec= &(s-...
1
[ "CWE-310" ]
openssl
610dfc3ef4c4019394534023115226f4ed0e7204
12,924,756,489,357,260,000,000,000,000,000,000,000
123
Don't crash when processing a zero-length, TLS >= 1.1 record. The previous CBC patch was bugged in that there was a path through enc() in s3_pkt.c/d1_pkt.c which didn't set orig_len. orig_len would be left at the previous value which could suggest that the packet was a sufficient length when it wasn't. (cherry picked ...
doit (void) { char *badutf8 = strdup ("\x7e\x64\x61\x72\x10\x2f\x2f\xf9\x2b\x71" "\x60\x79\x7b\x2e\x63\x75\x2b\x61\x65\x72" "\x75\x65\x56\x66\x7f\x62\xc5\x76\xe5\x00"); char *s = NULL; int rc; rc = idna_to_ascii_8z (badutf8, &s, 0); free (badutf8); if (rc != IDNA_ICONV_ERROR) fail ("rc %d\n",...
0
[]
libidn
2e97c2796581c27213962c77f5a8571a598f9a2e
78,624,231,428,163,810,000,000,000,000,000,000,000
15
libidn: stringprep_utf8_to_ucs4 now rejects invalid UTF-8. CVE-2015-2059
int snd_timer_open(struct snd_timer_instance **ti, char *owner, struct snd_timer_id *tid, unsigned int slave_id) { struct snd_timer *timer; struct snd_timer_instance *timeri = NULL; struct device *card_dev_to_put = NULL; int err; mutex_lock(&register_mutex); if (tid->dev_class == SNDRV_TIMER_CLASS_SLAV...
1
[ "CWE-416", "CWE-703" ]
linux
e7af6307a8a54f0b873960b32b6a644f2d0fbd97
251,259,451,354,317,680,000,000,000,000,000,000,000
104
ALSA: timer: Fix incorrectly assigned timer instance The clean up commit 41672c0c24a6 ("ALSA: timer: Simplify error path in snd_timer_open()") unified the error handling code paths with the standard goto, but it introduced a subtle bug: the timer instance is stored in snd_timer_open() incorrectly even if it returns an...
static zend_long firebird_handle_doer(pdo_dbh_t *dbh, const char *sql, size_t sql_len) /* {{{ */ { pdo_firebird_db_handle *H = (pdo_firebird_db_handle *)dbh->driver_data; isc_stmt_handle stmt = PDO_FIREBIRD_HANDLE_INITIALIZER; static char const info_count[] = { isc_info_sql_records }; char result[64]; int ret = 0;...
0
[ "CWE-787" ]
php-src
08da7c73726f7b86b67d6f0ff87c73c585a7834a
144,911,972,521,096,340,000,000,000,000,000,000,000
68
Fix #76449: SIGSEGV in firebird_handle_doer We need to verify that the `result_size` is not larger than our buffer, and also should make sure that the `len` which is passed to `isc_vax_integer()` has a permissible value; otherwise we bail out.
display_dollar(colnr_T col) { colnr_T save_col; if (!redrawing()) return; cursor_off(); save_col = curwin->w_cursor.col; curwin->w_cursor.col = col; if (has_mbyte) { char_u *p; // If on the last byte of a multi-byte move to the first byte. p = ml_get_curline(); curwin->w_cursor.col -...
1
[ "CWE-126", "CWE-787" ]
vim
e98c88c44c308edaea5994b8ad4363e65030968c
265,859,281,386,315,900,000,000,000,000,000,000,000
26
patch 9.0.0218: reading before the start of the line Problem: Reading before the start of the line. Solution: When displaying "$" check the column is not negative.
xmlXPtrGetIndex(xmlNodePtr cur) { int i; if ((cur == NULL) || (cur->type == XML_NAMESPACE_DECL)) return(-1); for (i = 1;cur != NULL;cur = cur->prev) { if ((cur->type == XML_ELEMENT_NODE) || (cur->type == XML_DOCUMENT_NODE) || (cur->type == XML_HTML_DOCUMENT_NODE)) { i++; } } return...
0
[ "CWE-416" ]
libxml2
9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
104,459,908,739,806,360,000,000,000,000,000,000,000
13
Fix XPointer paths beginning with range-to The old code would invoke the broken xmlXPtrRangeToFunction. range-to isn't really a function but a special kind of location step. Remove this function and always handle range-to in the XPath code. The old xmlXPtrRangeToFunction could also be abused to trigger a use-after-fr...
void set_reserved_vector(const unsigned int arg) { unsigned int siz = _cimg_mp_size(arg); int *ptr = memtype.data(arg + 1); while (siz-->0) *(ptr++) = -1; }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
158,208,362,648,627,340,000,000,000,000,000,000,000
5
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
int copy_siginfo_from_user(kernel_siginfo_t *to, const siginfo_t __user *from) { if (copy_from_user(to, from, sizeof(struct kernel_siginfo))) return -EFAULT; return post_copy_siginfo_from_user(to, from); }
0
[ "CWE-190" ]
linux
d1e7fd6462ca9fc76650fbe6ca800e35b24267da
124,625,986,354,863,300,000,000,000,000,000,000,000
6
signal: Extend exec_id to 64bits Replace the 32bit exec_id with a 64bit exec_id to make it impossible to wrap the exec_id counter. With care an attacker can cause exec_id wrap and send arbitrary signals to a newly exec'd parent. This bypasses the signal sending checks if the parent changes their credentials during e...
SpoolssRouterReplyPrinter_r(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, dcerpc_info *di, guint8 *drep) { /* Parse packet */ offset = dissect_doserror( tvb, offset, pinfo, tree, di, drep, hf_rc, NULL); return offset; }
0
[ "CWE-399" ]
wireshark
b4d16b4495b732888e12baf5b8a7e9bf2665e22b
17,576,365,486,811,965,000,000,000,000,000,000,000
10
SPOOLSS: Try to avoid an infinite loop. Use tvb_reported_length_remaining in dissect_spoolss_uint16uni. Make sure our offset always increments in dissect_spoolss_keybuffer. Change-Id: I7017c9685bb2fa27161d80a03b8fca4ef630e793 Reviewed-on: https://code.wireshark.org/review/14687 Reviewed-by: Gerald Combs <gerald@wires...
void unit_notify(Unit *u, UnitActiveState os, UnitActiveState ns, bool reload_success) { Manager *m; bool unexpected; assert(u); assert(os < _UNIT_ACTIVE_STATE_MAX); assert(ns < _UNIT_ACTIVE_STATE_MAX); /* Note that this is called for all low-level state changes, ...
0
[]
systemd
5ba6985b6c8ef85a8bcfeb1b65239c863436e75b
177,327,248,126,312,050,000,000,000,000,000,000,000
202
core: allow PIDs to be watched by two units at the same time In some cases it is interesting to map a PID to two units at the same time. For example, when a user logs in via a getty, which is reexeced to /sbin/login that binary will be explicitly referenced as main pid of the getty service, as well as implicitly refer...
static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw, struct ieee80211_sta *sta, struct sk_buff *skb) { return false; }
0
[ "CWE-400", "CWE-401" ]
linux
3f93616951138a598d930dcaec40f2bfd9ce43bb
114,628,340,653,968,060,000,000,000,000,000,000,000
6
rtlwifi: prevent memory leak in rtl_usb_probe In rtl_usb_probe if allocation for usb_data fails the allocated hw should be released. In addition the allocated rtlpriv->usb_data should be released on error handling path. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Signed-off-by: Kalle Valo <kvalo@codeau...
static int kvm_set_memslot(struct kvm *kvm, struct kvm_memory_slot *old, struct kvm_memory_slot *new, enum kvm_mr_change change) { struct kvm_memory_slot *invalid_slot; int r; /* * Released in kvm_swap_active_memslots. * * Must be held from before the current memslots are copied until * a...
0
[ "CWE-476" ]
linux
5593473a1e6c743764b08e3b6071cb43b5cfa6c4
294,304,306,722,988,600,000,000,000,000,000,000,000
94
KVM: avoid NULL pointer dereference in kvm_dirty_ring_push kvm_vcpu_release() will call kvm_dirty_ring_free(), freeing ring->dirty_gfns and setting it to NULL. Afterwards, it calls kvm_arch_vcpu_destroy(). However, if closing the file descriptor races with KVM_RUN in such away that vcpu->arch.st.preempted == 0, the ...
static int create_auto_midi_quirk(struct snd_usb_audio *chip, struct usb_interface *iface, struct usb_driver *driver) { struct usb_host_interface *alts; struct usb_interface_descriptor *altsd; struct usb_endpoint_descriptor *epd; int err; alts = &iface->altsetting[0]; altsd = get_iface_desc(alts); ...
0
[]
sound
0f886ca12765d20124bd06291c82951fd49a33be
99,634,432,750,079,140,000,000,000,000,000,000,000
35
ALSA: usb-audio: Fix NULL dereference in create_fixed_stream_quirk() create_fixed_stream_quirk() may cause a NULL-pointer dereference by accessing the non-existing endpoint when a USB device with a malformed USB descriptor is used. This patch avoids it simply by adding a sanity check of bNumEndpoints before the acces...
cmsToneCurve* _cmsBuildKToneCurve(cmsContext ContextID, cmsUInt32Number nPoints, cmsUInt32Number nProfiles, const cmsUInt32Number Intents[], const cmsHPROFILE hProfi...
0
[]
Little-CMS
41d222df1bc6188131a8f46c32eab0a4d4cdf1b6
333,691,934,699,905,660,000,000,000,000,000,000,000
53
Memory squeezing fix: lcms2 cmsPipeline construction When creating a new pipeline, lcms would often try to allocate a stage and pass it to cmsPipelineInsertStage without checking whether the allocation succeeded. cmsPipelineInsertStage would then assert (or crash) if it had not. The fix here is to change cmsPipelineI...
void gpp_read_box(GF_BitStream *bs, GF_BoxRecord *rec) { rec->top = gf_bs_read_u16(bs); rec->left = gf_bs_read_u16(bs); rec->bottom = gf_bs_read_u16(bs); rec->right = gf_bs_read_u16(bs); }
0
[ "CWE-476" ]
gpac
d527325a9b72218612455a534a508f9e1753f76e
202,820,718,924,572,170,000,000,000,000,000,000,000
7
fixed #1768
init_class_tab(void) { int i; static int done = FALSE; if (done) return; for (i = 0; i < 256; ++i) { if (i >= '0' && i <= '7') class_tab[i] = RI_DIGIT + RI_HEX + RI_OCTAL + RI_WORD; else if (i >= '8' && i <= '9') class_tab[i] = RI_DIGIT + RI_HEX + RI_WORD; else if (i >= 'a' && i <= ...
0
[ "CWE-416" ]
vim
32acf1f1a72ebb9d8942b9c9d80023bf1bb668ea
178,126,752,784,473,370,000,000,000,000,000,000,000
31
patch 9.0.0047: using freed memory with recursive substitute Problem: Using freed memory with recursive substitute. Solution: Always make a copy for reg_prev_sub.
irc_nick_realloc_prefixes (struct t_irc_server *server, int old_length, int new_length) { struct t_irc_channel *ptr_channel; struct t_irc_nick *ptr_nick; char *new_prefixes; for (ptr_channel = server->channels; ptr_channel; ptr_channel = ptr_channel->next_channel) ...
0
[ "CWE-120", "CWE-787" ]
weechat
40ccacb4330a64802b1f1e28ed9a6b6d3ca9197f
242,063,702,986,238,340,000,000,000,000,000,000,000
40
irc: fix crash when a new message 005 is received with longer nick prefixes Thanks to Stuart Nevans Locke for reporting the issue.
static void task_new_fair(struct rq *rq, struct task_struct *p) { struct cfs_rq *cfs_rq = task_cfs_rq(p); struct sched_entity *se = &p->se, *curr = cfs_rq->curr; int this_cpu = smp_processor_id(); sched_info_queued(p); update_curr(cfs_rq); place_entity(cfs_rq, se, 1); /* 'curr' will be NULL if the child belon...
0
[]
linux-2.6
6a6029b8cefe0ca7e82f27f3904dbedba3de4e06
20,302,769,891,696,013,000,000,000,000,000,000,000
24
sched: simplify sched_slice() Use the existing calc_delta_mine() calculation for sched_slice(). This saves a divide and simplifies the code because we share it with the other /cfs_rq->load users. It also improves code size: text data bss dec hex filename 42659 2740 144 45543 b1e...
void xgroupCommand(client *c) { const char *help[] = { "CREATE <key> <groupname> <id or $> [opt] -- Create a new consumer group.", " option MKSTREAM: create the empty stream if it does not exist.", "SETID <key> <groupname> <id or $> -- Set the current group ID.", "DESTROY <key> <groupname...
0
[ "CWE-190" ]
redis
f6a40570fa63d5afdd596c78083d754081d80ae3
64,543,542,043,160,790,000,000,000,000,000,000,000
132
Fix ziplist and listpack overflows and truncations (CVE-2021-32627, CVE-2021-32628) - fix possible heap corruption in ziplist and listpack resulting by trying to allocate more than the maximum size of 4GB. - prevent ziplist (hash and zset) from reaching size of above 1GB, will be converted to HT encoding, that's n...
static void initMemArray(Mem *p, int N, sqlite3 *db, u16 flags){ while( (N--)>0 ){ p->db = db; p->flags = flags; p->szMalloc = 0; #ifdef SQLITE_DEBUG p->pScopyFrom = 0; #endif p++; } }
0
[ "CWE-755" ]
sqlite
8654186b0236d556aa85528c2573ee0b6ab71be3
321,610,772,949,466,240,000,000,000,000,000,000,000
11
When an error occurs while rewriting the parser tree for window functions in the sqlite3WindowRewrite() routine, make sure that pParse->nErr is set, and make sure that this shuts down any subsequent code generation that might depend on the transformations that were implemented. This fixes a problem discovered by the Y...
static int _waiter_init (uint32_t jobid) { if (!waiters) waiters = list_create((ListDelF) _waiter_destroy); /* * Exit this thread if another thread is waiting on job */ if (list_find_first (waiters, (ListFindF) _find_waiter, &jobid)) return SLURM_ERROR; else list_append(waiters, _waiter_create(jobid)); ...
0
[ "CWE-20" ]
slurm
df545955e4f119974c278bff0c47155257d5afc7
48,627,884,222,997,565,000,000,000,000,000,000,000
15
Validate gid and user_name values provided to slurmd up front. Do not defer until later, and do not potentially miss out on proper validation of the user_name field which can lead to improper authentication handling. CVE-2018-10995.
int message_parser_read_more(struct message_parser_ctx *ctx, struct message_block *block_r, bool *full_r) { int ret; if (ctx->skip > 0) { i_stream_skip(ctx->input, ctx->skip); ctx->skip = 0; } *full_r = FALSE; ret = i_stream_read_bytes(ctx->input, &block_r->data, &block_r->size, ctx->want_count...
0
[ "CWE-20" ]
core
fb97a1cddbda4019e327fa736972a1c7433fedaa
267,464,397,074,224,600,000,000,000,000,000,000,000
45
lib-mail: message-parser - Fix assert-crash when enforcing MIME part limit The limit could have been exceeded with message/rfc822 parts.
* %NULL on failure */ struct iscsi_bus_flash_conn * iscsi_create_flashnode_conn(struct Scsi_Host *shost, struct iscsi_bus_flash_session *fnode_sess, struct iscsi_transport *transport, int dd_size) { struct iscsi_bus_flash_conn *fnode_conn; int err; fnode_conn = kzalloc(sizeof(*fnode_conn) + ...
0
[ "CWE-787" ]
linux
ec98ea7070e94cc25a422ec97d1421e28d97b7ee
127,345,786,112,221,450,000,000,000,000,000,000,000
32
scsi: iscsi: Ensure sysfs attributes are limited to PAGE_SIZE As the iSCSI parameters are exported back through sysfs, it should be enforcing that they never are more than PAGE_SIZE (which should be more than enough) before accepting updates through netlink. Change all iSCSI sysfs attributes to use sysfs_emit(). Cc:...
Bool rfbSendRectEncodingRaw(rfbClientPtr cl, int x, int y, int w, int h) { rfbFramebufferUpdateRectHeader rect; int nlines; int bytesPerLine = w * (cl->format.bitsPerPixel / 8); char *fbptr = (cl->fb + (rfbFB.paddedWidthInBytes * y) + (x * (rfbFB.bitsPerPixel / 8))); /* Flush the buffer to guarantee corr...
0
[ "CWE-787" ]
turbovnc
cea98166008301e614e0d36776bf9435a536136e
85,852,924,783,758,190,000,000,000,000,000,000,000
59
Server: Fix two issues identified by ASan 1. If the TLSPlain and X509Plain security types were both disabled, then rfbOptPamAuth() would overflow the name field in the secTypes structure when testing the "none" security type, since the name of that security type has less than five characters. This issue was ...
TEST_F(Http1ServerConnectionImplTest, Http11AbsolutePathBad) { initialize(); Buffer::OwnedImpl buffer("GET * HTTP/1.1\r\nHost: bah\r\n\r\n"); expect400(Protocol::Http11, true, buffer, "http1.invalid_url"); }
0
[ "CWE-770" ]
envoy
7ca28ff7d46454ae930e193d97b7d08156b1ba59
241,887,986,914,794,100,000,000,000,000,000,000,000
6
[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>
void DeallocateRaw(void* ptr) override { if (ptr != memory_region_->data()) { LOG(ERROR) << "Deallocating not allocated region for readonly memory region"; } if (delete_on_deallocate_) { delete this; } }
0
[ "CWE-125" ]
tensorflow
1cb6bb6c2a6019417c9adaf9e6843ba75ee2580b
57,661,419,415,885,650,000,000,000,000,000,000,000
9
Add error checking to ImmutableConst OP that strings are not yet supported. PiperOrigin-RevId: 401065359 Change-Id: I9dd2bd2a2c36f22f4a05153daf6ebdc4613469d2
static int rtreeOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){ int rc = SQLITE_NOMEM; Rtree *pRtree = (Rtree *)pVTab; RtreeCursor *pCsr; pCsr = (RtreeCursor *)sqlite3_malloc64(sizeof(RtreeCursor)); if( pCsr ){ memset(pCsr, 0, sizeof(RtreeCursor)); pCsr->base.pVtab = pVTab; rc = SQLITE...
0
[ "CWE-125" ]
sqlite
e41fd72acc7a06ce5a6a7d28154db1ffe8ba37a8
88,459,725,844,604,610,000,000,000,000,000,000,000
16
Enhance the rtreenode() function of rtree (used for testing) so that it uses the newer sqlite3_str object for better performance and improved error reporting. FossilOrigin-Name: 90acdbfce9c088582d5165589f7eac462b00062bbfffacdcc786eb9cf3ea5377
private uint64_t file_strncmp16(const char *a, const char *b, size_t len, uint32_t flags) { /* * XXX - The 16-bit string compare probably needs to be done * differently, especially if the flags are to be supported. * At the moment, I am unsure. */ flags = 0;
0
[ "CWE-20" ]
php-src
74555e7c26b2c61bb8e67b7d6a6f4d2b8eb3a5f3
239,352,830,117,474,630,000,000,000,000,000,000,000
10
Fixed bug #64830 mimetype detection segfaults on mp3 file
static int fuse_flush(struct file *file, fl_owner_t id) { struct inode *inode = file_inode(file); struct fuse_mount *fm = get_fuse_mount(inode); struct fuse_file *ff = file->private_data; struct fuse_flush_in inarg; FUSE_ARGS(args); int err; if (is_bad_inode(inode)) return -EIO; err = write_inode_now(inode,...
1
[ "CWE-459" ]
linux
5d069dbe8aaf2a197142558b6fb2978189ba3454
125,913,326,447,398,000,000,000,000,000,000,000,000
53
fuse: fix bad inode Jan Kara's analysis of the syzbot report (edited): The reproducer opens a directory on FUSE filesystem, it then attaches dnotify mark to the open directory. After that a fuse_do_getattr() call finds that attributes returned by the server are inconsistent, and calls make_bad_inode() which,...
int git_delta_index_init( git_delta_index **out, const void *buf, size_t bufsize) { unsigned int i, hsize, hmask, entries, prev_val, *hash_count; const unsigned char *data, *buffer = buf; struct git_delta_index *index; struct index_entry *entry, **hash; void *mem; unsigned long memsize; *out = NULL; if (!buf...
0
[ "CWE-190", "CWE-125" ]
libgit2
3f461902dc1072acb8b7607ee65d0a0458ffac2a
288,130,658,058,151,800,000,000,000,000,000,000,000
106
delta: fix sign-extension of big left-shift Our delta code was originally adapted from JGit, which itself adapted it from git itself. Due to this heritage, we inherited a bug from git.git in how we compute the delta offset, which was fixed upstream in 48fb7deb5 (Fix big left-shifts of unsigned char, 2009-06-17). As ex...
__i915_mm_struct_find(struct drm_i915_private *dev_priv, struct mm_struct *real) { struct i915_mm_struct *mm; /* Protected by dev_priv->mm_lock */ hash_for_each_possible(dev_priv->mm_structs, mm, node, (unsigned long)real) if (mm->mm == real) return mm; return NULL; }
0
[ "CWE-362" ]
linux
17839856fd588f4ab6b789f482ed3ffd7c403e1f
96,061,711,801,043,900,000,000,000,000,000,000,000
11
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...
TEST_P(PerRouteIntegrationTest, PerRouteConfigOK) { // A config with a requirement_map const std::string filter_conf = R"( providers: example_provider: issuer: https://example.com audiences: - example_service requirement_map: abc: provider_name: "example_provider" )"; // Per-r...
0
[ "CWE-476", "CWE-703" ]
envoy
9371333230b1a6e1be2eccf4868771e11af6253a
11,325,188,768,667,374,000,000,000,000,000,000,000
48
CVE-2021-43824 jwt_atuhn: fixed the crash when a CONNECT request is sent to JWT filter configured with regex match. Signed-off-by: Yan Avlasov <yavlasov@google.com>
static int MP4_ReadBox_sample_soun( stream_t *p_stream, MP4_Box_t *p_box ) { p_box->i_handler = ATOM_soun; MP4_READBOX_ENTER( MP4_Box_data_sample_soun_t ); p_box->data.p_sample_soun->p_qt_description = NULL; /* Sanity check needed because the "wave" box does also contain an * "mp4a" box that we do...
0
[ "CWE-120", "CWE-191", "CWE-787" ]
vlc
2e7c7091a61aa5d07e7997b393d821e91f593c39
84,128,509,204,929,890,000,000,000,000,000,000,000
171
demux: mp4: fix buffer overflow in parsing of string boxes. We ensure that pbox->i_size is never smaller than 8 to avoid an integer underflow in the third argument of the subsequent call to memcpy. We also make sure no truncation occurs when passing values derived from the 64 bit integer p_box->i_size to arguments of ...
void bat_socket_init(void) { memset(socket_client_hash, 0, sizeof(socket_client_hash)); }
0
[ "CWE-119" ]
linux-2.6
b5a1eeef04cc7859f34dec9b72ea1b28e4aba07c
281,800,091,747,055,200,000,000,000,000,000,000,000
4
batman-adv: Only write requested number of byte to user buffer Don't write more than the requested number of bytes of an batman-adv icmp packet to the userspace buffer. Otherwise unrelated userspace memory might get overridden by the kernel. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lind...
void init_idle(struct task_struct *idle, int cpu) { struct rq *rq = cpu_rq(cpu); unsigned long flags; raw_spin_lock_irqsave(&idle->pi_lock, flags); raw_spin_lock(&rq->lock); __sched_fork(0, idle); idle->state = TASK_RUNNING; idle->se.exec_start = sched_clock(); kasan_unpoison_task_stack(idle); #ifdef CONFIG...
0
[ "CWE-119" ]
linux
29d6455178a09e1dc340380c582b13356227e8df
42,986,810,940,898,590,000,000,000,000,000,000,000
58
sched: panic on corrupted stack end Until now, hitting this BUG_ON caused a recursive oops (because oops handling involves do_exit(), which calls into the scheduler, which in turn raises an oops), which caused stuff below the stack to be overwritten until a panic happened (e.g. via an oops in interrupt context, cause...
int X509_print_fp(FILE *fp, X509 *x) { return X509_print_ex_fp(fp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT); }
0
[ "CWE-125" ]
openssl
d9d838ddc0ed083fb4c26dd067e71aad7c65ad16
133,522,003,145,174,240,000,000,000,000,000,000,000
4
Fix a read buffer overrun in X509_aux_print(). The ASN1_STRING_get0_data(3) manual explitely cautions the reader that the data is not necessarily NUL-terminated, and the function X509_alias_set1(3) does not sanitize the data passed into it in any way either, so we must assume the return value from X509_alias_get0(3) i...
unsigned long __init absent_pages_in_range(unsigned long start_pfn, unsigned long end_pfn) { return __absent_pages_in_range(MAX_NUMNODES, start_pfn, end_pfn); }
0
[]
linux
400e22499dd92613821374c8c6c88c7225359980
297,924,267,904,322,580,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...
static zval **php_zip_get_property_ptr_ptr(zval *object, zval *member TSRMLS_DC) /* {{{ */ { ze_zip_object *obj; zval tmp_member; zval **retval = NULL; zip_prop_handler *hnd; zend_object_handlers *std_hnd; int ret; if (member->type != IS_STRING) { tmp_member = *member; zval_copy_ctor(&tmp_member); conver...
0
[]
php-src
ce96fd6b0761d98353761bf78d5bfb55291179fd
121,997,068,859,138,600,000,000,000,000,000,000,000
35
- fix #39863, do not accept paths with NULL in them. See http://news.php.net/php.internals/50191, trunk will have the patch later (adding a macro and/or changing (some) APIs. Patch by Rasmus
static PHP_FUNCTION(session_name) { char *name = NULL; int name_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &name, &name_len) == FAILURE) { return; } RETVAL_STRING(PS(session_name), 1); if (name) { zend_alter_ini_entry("session.name", sizeof("session.name"), name, name_len, PHP_INI_USER...
0
[ "CWE-264" ]
php-src
25e8fcc88fa20dc9d4c47184471003f436927cde
72,300,881,532,835,100,000,000,000,000,000,000,000
15
Strict session
static int vfswrap_statvfs(struct vfs_handle_struct *handle, const char *path, vfs_statvfs_struct *statbuf) { return sys_statvfs(path, statbuf); }
0
[ "CWE-665" ]
samba
30e724cbff1ecd90e5a676831902d1e41ec1b347
130,460,745,405,610,300,000,000,000,000,000,000,000
4
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>
enum row_type ha_maria::get_row_type() const { switch (file->s->data_file_type) { case STATIC_RECORD: return ROW_TYPE_FIXED; case DYNAMIC_RECORD: return ROW_TYPE_DYNAMIC; case BLOCK_RECORD: return ROW_TYPE_PAGE; case COMPRESSED_RECORD: return ROW_TYPE_COMPRESSED; default: return R...
0
[ "CWE-400" ]
server
9e39d0ae44595dbd1570805d97c9c874778a6be8
288,839,827,937,121,430,000,000,000,000,000,000,000
10
MDEV-25787 Bug report: crash on SELECT DISTINCT thousands_blob_fields fix a debug assert to account for not opened temp tables
sync_cookie_isvalid(Sync_Cookie *testcookie, Sync_Cookie *refcookie) { /* client and server info must match */ if (testcookie == NULL || refcookie == NULL) { return 0; } if ((testcookie->openldap_compat != refcookie->openldap_compat || strcmp(testcookie->cookie_client_signature, refcook...
0
[ "CWE-476" ]
389-ds-base
d7eef2fcfbab2ef8aa6ee0bf60f0a9b16ede66e0
235,058,665,187,629,700,000,000,000,000,000,000,000
28
Issue 4711 - SIGSEV with sync_repl (#4738) Bug description: sync_repl sends back entries identified with a unique identifier that is 'nsuniqueid'. If 'nsuniqueid' is missing, then it may crash Fix description: Check a nsuniqueid is available else returns OP_ERR relates: https://github.com/389ds/389-ds-ba...
void GC_deinit(void) { # ifdef THREADS if (GC_is_initialized) { DeleteCriticalSection(&GC_write_cs); } # endif }
0
[ "CWE-119" ]
bdwgc
7292c02fac2066d39dd1bcc37d1a7054fd1e32ee
83,480,140,125,016,100,000,000,000,000,000,000,000
8
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...
replace_interleave(PyStringObject *self, const char *to_s, Py_ssize_t to_len, Py_ssize_t maxcount) { char *self_s, *result_s; Py_ssize_t self_len, result_len; Py_ssize_t count, i; PyStringObject *result; self_len = PyString_GET_SIZE(self); /* 1 at the end ...
0
[ "CWE-190" ]
cpython
c3c9db89273fabc62ea1b48389d9a3000c1c03ae
253,206,030,867,790,430,000,000,000,000,000,000,000
55
[2.7] bpo-30657: Check & prevent integer overflow in PyString_DecodeEscape (#2174)
usm_lookup_auth_type(const char *str) { return usm_lookup_alg_type(str, usm_auth_type ); }
0
[ "CWE-415" ]
net-snmp
5f881d3bf24599b90d67a45cae7a3eb099cd71c9
226,917,884,336,528,870,000,000,000,000,000,000,000
4
libsnmp, USM: Introduce a reference count in struct usmStateReference This patch fixes https://sourceforge.net/p/net-snmp/bugs/2956/.
do_query_fs_info (GVfsBackend *backend, GVfsJobQueryFsInfo *job, const char *filename, GFileInfo *info, GFileAttributeMatcher *attribute_matcher) { SoupMessage *msg; Multistatus ms; xmlNodeIter iter; gb...
0
[]
gvfs
f81ff2108ab3b6e370f20dcadd8708d23f499184
232,843,501,204,057,970,000,000,000,000,000,000,000
81
dav: don't unescape the uri twice path_equal tries to unescape path before comparing. Unfortunately this function is used also for already unescaped paths. Therefore unescaping can fail. This commit reverts changes which was done in commit 50af53d and unescape just uris, which aren't unescaped yet. https://bugzilla.g...
static inline struct sock *unix_find_socket_byname(struct net *net, struct sockaddr_un *sunname, int len, int type, unsigned int hash) { struct sock *s; spin_lock(&unix_table_lock); s = __unix_find_socket_byname(net, sunname, len, type, hash); if (s) sock_hold(s); spin_unlock(&unix_ta...
0
[ "CWE-287", "CWE-284" ]
linux
e0e3cea46d31d23dc40df0a49a7a2c04fe8edfea
128,809,843,114,673,510,000,000,000,000,000,000,000
14
af_netlink: force credentials passing [CVE-2012-3520] Pablo Neira Ayuso discovered that avahi and potentially NetworkManager accept spoofed Netlink messages because of a kernel bug. The kernel passes all-zero SCM_CREDENTIALS ancillary data to the receiver if the sender did not provide such data, instead of not includ...
Status FusedBatchNormGradShape(shape_inference::InferenceContext* c) { string data_format_str; TF_RETURN_IF_ERROR(c->GetAttr("data_format", &data_format_str)); TensorFormat data_format; if (!FormatFromString(data_format_str, &data_format)) { return errors::InvalidArgument("Invalid data format string: ", ...
0
[ "CWE-369" ]
tensorflow
8a793b5d7f59e37ac7f3cd0954a750a2fe76bad4
250,915,972,027,392,830,000,000,000,000,000,000,000
40
Prevent division by 0 in common shape functions. PiperOrigin-RevId: 387712197 Change-Id: Id25c7460e35b68aeeeac23b9a88e455b443ee149
update_line (old, new, current_line, omax, nmax, inv_botlin) register char *old, *new; int current_line, omax, nmax, inv_botlin; { register char *ofd, *ols, *oe, *nfd, *nls, *ne; int temp, lendiff, wsatend, od, nd, twidth, o_cpos; int current_invis_chars; int col_lendiff, col_temp; int bytes_to_inse...
0
[]
bash
955543877583837c85470f7fb8a97b7aa8d45e6c
219,417,445,363,121,500,000,000,000,000,000,000,000
632
bash-4.4-rc2 release
int kvm_vm_ioctl_register_coalesced_mmio(struct kvm *kvm, struct kvm_coalesced_mmio_zone *zone) { int ret; struct kvm_coalesced_mmio_dev *dev; if (zone->pio != 1 && zone->pio != 0) return -EINVAL; dev = kzalloc(sizeof(struct kvm_coalesced_mmio_dev), GFP_KERNEL_ACCOUNT); if (!dev) return -ENOMEM...
0
[ "CWE-787" ]
kvm
b60fe990c6b07ef6d4df67bc0530c7c90a62623a
320,830,746,629,620,600,000,000,000,000,000,000,000
35
KVM: coalesced_mmio: add bounds checking The first/last indexes are typically shared with a user app. The app can change the 'last' index that the kernel uses to store the next result. This change sanity checks the index before using it for writing to a potentially arbitrary address. This fixes CVE-2019-14821. Cc: ...
static struct tcp_md5sig_key *tcp_v6_md5_do_lookup(const struct sock *sk, const struct in6_addr *addr) { return NULL; }
0
[ "CWE-416", "CWE-284", "CWE-264" ]
linux
45f6fad84cc305103b28d73482b344d7f5b76f39
66,028,485,355,124,000,000,000,000,000,000,000,000
5
ipv6: add complete rcu protection around np->opt This patch addresses multiple problems : UDP/RAW sendmsg() need to get a stable struct ipv6_txoptions while socket is not locked : Other threads can change np->opt concurrently. Dmitry posted a syzkaller (http://github.com/google/syzkaller) program desmonstrating use-a...
size_t olm_unpickle_pk_decryption( OlmPkDecryption * decryption, void const * key, size_t key_length, void *pickled, size_t pickled_length, void *pubkey, size_t pubkey_length ) { OlmPkDecryption & object = *decryption; if (pubkey != NULL && pubkey_length < olm_pk_key_length()) { object.l...
0
[ "CWE-787" ]
olm
ccc0d122ee1b4d5e5ca4ec1432086be17d5f901b
312,045,742,178,222,820,000,000,000,000,000,000,000
39
olm_pk_decrypt: Ensure inputs are of correct length.