func
string
target
int64
cwe
list
project
string
commit_id
string
hash
float64
size
int64
message
string
MagickExport ResampleFilter *AcquireResampleFilter(const Image *image, ExceptionInfo *exception) { ResampleFilter *resample_filter; assert(image != (Image *) NULL); assert(image->signature == MagickCoreSignature); if (image->debug != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s...
0
[ "CWE-369" ]
ImageMagick
8d25d94a363b104acd6ff23df7470aeedb806c51
114,940,163,410,715,200,000,000,000,000,000,000,000
29
https://github.com/ImageMagick/ImageMagick/issues/3195
Status SparseReduceShapeFn(InferenceContext* c) { // Input 0: input_indices // Input 1: input_values // Input 2: input_shape // Input 3: reduction_axes // Attr: keep_dims bool keep_dims = false; TF_RETURN_IF_ERROR(c->GetAttr("keep_dims", &keep_dims)); const Tensor* shape_tensor = c->input_tensor(2); ...
0
[ "CWE-125" ]
tensorflow
a0d64445116c43cf46a5666bd4eee28e7a82f244
143,681,365,968,523,090,000,000,000,000,000,000,000
47
Prevent OOB access in QuantizeV2 shape inference PiperOrigin-RevId: 400309614 Change-Id: I31412c71b05b4f21b677f7fa715a61499cbee39d
void gnutls_ocsp_req_deinit(gnutls_ocsp_req_t req) { if (!req) return; if (req->req) asn1_delete_structure(&req->req); req->req = NULL; gnutls_free(req); }
0
[ "CWE-264" ]
gnutls
964632f37dfdfb914ebc5e49db4fa29af35b1de9
303,996,352,548,448,530,000,000,000,000,000,000,000
11
ocsp: corrected the comparison of the serial size in OCSP response Previously the OCSP certificate check wouldn't verify the serial length and could succeed in cases it shouldn't. Reported by Stefan Buehler.
static void test_open_direct() { MYSQL_STMT *stmt; MYSQL_RES *result; int rc; myheader("test_open_direct"); rc= mysql_query(mysql, "DROP TABLE IF EXISTS test_open_direct"); myquery(rc); rc= mysql_query(mysql, "CREATE TABLE test_open_direct(id int, name char(6))"); myquery(rc); stmt= mys...
0
[ "CWE-284", "CWE-295" ]
mysql-server
3bd5589e1a5a93f9c224badf983cd65c45215390
252,314,174,111,081,800,000,000,000,000,000,000,000
97
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 bool svm_has_high_real_mode_segbase(void) { return true; }
0
[ "CWE-200", "CWE-399" ]
linux
cbdb967af3d54993f5814f1cee0ed311a055377d
218,802,143,061,203,230,000,000,000,000,000,000,000
4
KVM: svm: unconditionally intercept #DB This is needed to avoid the possibility that the guest triggers an infinite stream of #DB exceptions (CVE-2015-8104). VMX is not affected: because it does not save DR6 in the VMCS, it already intercepts #DB unconditionally. Reported-by: Jan Beulich <jbeulich@suse.com> Cc: stab...
static void ide_atapi_cmd_reply(IDEState *s, int size, int max_size) { if (size > max_size) size = max_size; s->lba = -1; /* no sector read */ s->packet_transfer_size = size; s->io_buffer_size = size; /* dma: send the reply data as one chunk */ s->elementary_transfer_size = 0; s->io_b...
0
[]
qemu
ce560dcf20c14194db5ef3b9fc1ea592d4e68109
96,452,717,558,706,660,000,000,000,000,000,000,000
20
ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0 The START STOP UNIT command will only eject/load media if power condition is zero. If power condition is !0 then LOEJ and START will be ignored. From MMC (sbc contains similar wordings too) The Power Conditions field requests the block device to be ...
TEST_F(QuicUnencryptedServerTransportTest, TestPendingZeroRttData) { auto data = IOBuf::copyBuffer("bad data"); size_t expectedPendingLen = server->getConn().transportSettings.maxPacketsToBuffer; for (size_t i = 0; i < expectedPendingLen + 10; ++i) { StreamId streamId = static_cast<StreamId>(i); aut...
0
[ "CWE-617", "CWE-703" ]
mvfst
a67083ff4b8dcbb7ee2839da6338032030d712b0
13,088,944,750,743,292,000,000,000,000,000,000,000
25
Close connection if we derive an extra 1-rtt write cipher Summary: Fixes CVE-2021-24029 Reviewed By: mjoras, lnicco Differential Revision: D26613890 fbshipit-source-id: 19bb2be2c731808144e1a074ece313fba11f1945
rb_str_index_m(argc, argv, str) int argc; VALUE *argv; VALUE str; { VALUE sub; VALUE initpos; long pos; if (rb_scan_args(argc, argv, "11", &sub, &initpos) == 2) { pos = NUM2LONG(initpos); } else { pos = 0; } if (pos < 0) { pos += RSTRING(str)->len; if (pos < 0) { if...
0
[ "CWE-20" ]
ruby
e926ef5233cc9f1035d3d51068abe9df8b5429da
18,547,230,177,375,508,000,000,000,000,000,000,000
61
* random.c (rb_genrand_int32, rb_genrand_real), intern.h: Export. * string.c (rb_str_tmp_new), intern.h: New function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@16014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
void HGraphBuilder::VisitForStatement(ForStatement* stmt) { ASSERT(!HasStackOverflow()); ASSERT(current_block() != NULL); ASSERT(current_block()->HasPredecessor()); if (stmt->init() != NULL) { CHECK_ALIVE(Visit(stmt->init())); } ASSERT(current_block() != NULL); bool osr_entry = PreProcessOsrEntry(stmt...
0
[]
node
fd80a31e0697d6317ce8c2d289575399f4e06d21
146,421,636,475,146,860,000,000,000,000,000,000,000
50
deps: backport 5f836c from v8 upstream Original commit message: Fix Hydrogen bounds check elimination When combining bounds checks, they must all be moved before the first load/store that they are guarding. BUG=chromium:344186 LOG=y R=svenpanne@chromium.org Review URL: https://coderevie...
bgp_attr_aspath (struct bgp_attr_parser_args *args) { struct attr *const attr = args->attr; struct peer *const peer = args->peer; const bgp_size_t length = args->length; /* * peer with AS4 => will get 4Byte ASnums * otherwise, will get 16 Bit */ attr->aspath = aspath_parse (peer->ibuf, length, ...
0
[]
quagga
8794e8d229dc9fe29ea31424883433d4880ef408
54,081,444,810,498,320,000,000,000,000,000,000,000
27
bgpd: Fix regression in args consolidation, total should be inited from args * bgp_attr.c: (bgp_attr_unknown) total should be initialised from the args.
static int multipart_buffer_read(multipart_buffer *self, char *buf, size_t bytes, int *end) { size_t len, max; char *bound; /* fill buffer if needed */ if (bytes > (size_t)self->bytes_in_buffer) { fill_buffer(self); } /* look for a potential boundary match, only read data up to that point */ if ((bound = php...
1
[ "CWE-190" ]
php-src
a3924ab6542a358a3099de992b63b932a9570add
132,859,395,381,270,940,000,000,000,000,000,000,000
41
Merge branch 'PHP-7.3' into PHP-7.4 * PHP-7.3: Fix #78876: Long variables cause OOM and temp files are not cleaned Fix #78875: Long filenames cause OOM and temp files are not cleaned Update NEWS for 7.2.31 Update CREDITS for PHP 7.2.30 Update NEWS for PHP 7.2.30
static inline void *get_freepointer(struct kmem_cache *s, void *object) { return freelist_dereference(s, object + s->offset); }
0
[]
linux
fd4d9c7d0c71866ec0c2825189ebd2ce35bd95b8
313,766,290,786,549,980,000,000,000,000,000,000,000
4
mm: slub: add missing TID bump in kmem_cache_alloc_bulk() When kmem_cache_alloc_bulk() attempts to allocate N objects from a percpu freelist of length M, and N > M > 0, it will first remove the M elements from the percpu freelist, then call ___slab_alloc() to allocate the next element and repopulate the percpu freelis...
GF_Err mhac_box_write(GF_Box *s, GF_BitStream *bs) { GF_Err e; GF_MHAConfigBox *ptr = (GF_MHAConfigBox *) s; e = gf_isom_box_write_header(s, bs); if (e) return e; gf_bs_write_u8(bs, ptr->configuration_version); gf_bs_write_u8(bs, ptr->mha_pl_indication); gf_bs_write_u8(bs, ptr->reference_channel_layout); gf_bs...
0
[ "CWE-787" ]
gpac
77510778516803b7f7402d7423c6d6bef50254c3
104,864,942,164,417,400,000,000,000,000,000,000,000
16
fixed #2255
remove_guard_from_confirmed_and_primary_lists(guard_selection_t *gs, entry_guard_t *guard) { if (guard->is_primary) { guard->is_primary = 0; smartlist_remove_keeporder(gs->primary_entry_guards, guard); } else { if (BUG(smartlist_contains(gs->primary_entry_gu...
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
214,806,887,448,103,550,000,000,000,000,000,000,000
24
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
void perf_tp_event(u64 addr, u64 count, void *record, int entry_size, struct pt_regs *regs, struct hlist_head *head, int rctx, struct task_struct *task) { struct perf_sample_data data; struct perf_event *event; struct perf_raw_record raw = { .size = entry_size, .data = record, }; perf_sample_data_i...
0
[ "CWE-703", "CWE-189" ]
linux
8176cced706b5e5d15887584150764894e94e02f
145,720,711,509,074,360,000,000,000,000,000,000,000
47
perf: Treat attr.config as u64 in perf_swevent_init() Trinity discovered that we fail to check all 64 bits of attr.config passed by user space, resulting to out-of-bounds access of the perf_swevent_enabled array in sw_perf_event_destroy(). Introduced in commit b0a873ebb ("perf: Register PMU implementations"). Signed...
bool LEX::push_context(Name_resolution_context *context) { DBUG_ENTER("LEX::push_context"); DBUG_PRINT("info", ("Context: %p Select: %p (%d)", context, context->select_lex, (context->select_lex ? context->select_lex->select_number: ...
0
[ "CWE-703" ]
server
39feab3cd31b5414aa9b428eaba915c251ac34a2
152,804,793,684,407,020,000,000,000,000,000,000,000
11
MDEV-26412 Server crash in Item_field::fix_outer_field for INSERT SELECT IF an INSERT/REPLACE SELECT statement contained an ON expression in the top level select and this expression used a subquery with a column reference that could not be resolved then an attempt to resolve this reference as an outer reference caused...
parsefsinfo(netdissect_options *ndo, const uint32_t *dp) { const struct nfsv3_fsinfo *sfp; int er; if (!(dp = parsestatus(ndo, dp, &er))) return (0); if (ndo->ndo_vflag) ND_PRINT((ndo, " POST:")); if (!(dp = parse_post_op_attr(ndo, dp, ndo->ndo_vflag))) return (0); if (er) return (1); sfp =...
0
[ "CWE-125", "CWE-787" ]
tcpdump
7a923447fd49a069a0fd3b6c3547438ab5ee2123
292,029,254,815,938,050,000,000,000,000,000,000,000
36
CVE-2017-13001/NFS: Don't copy more data than is in the file handle. Also, put the buffer on the stack; no reason to make it static. (65 bytes isn't a lot.) This fixes a buffer over-read discovered by Kamil Frankowicz. Add a test using the capture file supplied by the reporter(s).
static int selinux_socket_post_create(struct socket *sock, int family, int type, int protocol, int kern) { const struct task_security_struct *tsec = current_security(); struct inode_security_struct *isec = SOCK_INODE(sock)->i_security; struct sk_security_struct *sksec; int err = 0; isec->sclass = socket...
0
[ "CWE-264" ]
linux
259e5e6c75a910f3b5e656151dc602f53f9d7548
243,460,369,448,902,200,000,000,000,000,000,000,000
29
Add PR_{GET,SET}_NO_NEW_PRIVS to prevent execve from granting privs With this change, calling prctl(PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) disables privilege granting operations at execve-time. For example, a process will not be able to execute a setuid binary to change their uid or gid if this bit is set. The same is t...
ZSTD_CCtx* ZSTD_initStaticCCtx(void *workspace, size_t workspaceSize) { ZSTD_CCtx* const cctx = (ZSTD_CCtx*) workspace; if (workspaceSize <= sizeof(ZSTD_CCtx)) return NULL; /* minimum size */ if ((size_t)workspace & 7) return NULL; /* must be 8-aligned */ memset(workspace, 0, workspaceSize); /* may ...
0
[ "CWE-362" ]
zstd
3e5cdf1b6a85843e991d7d10f6a2567c15580da0
55,419,063,196,401,280,000,000,000,000,000,000,000
22
fixed T36302429
g_create_dir(const char* dirname) { #if defined(_WIN32) return CreateDirectoryA(dirname, 0); // test this #else return mkdir(dirname, (mode_t)-1) == 0; #endif }
0
[]
xrdp
d8f9e8310dac362bb9578763d1024178f94f4ecc
235,688,274,573,500,300,000,000,000,000,000,000,000
8
move temp files from /tmp to /tmp/.xrdp
Subgraph::Subgraph(ErrorReporter* error_reporter, TfLiteExternalContext** external_contexts, std::vector<std::unique_ptr<Subgraph>>* subgraphs, resource::ResourceMap* resources) : external_contexts_(external_contexts), error_reporter_(error_reporter), ...
0
[ "CWE-20", "CWE-787" ]
tensorflow
d58c96946b2880991d63d1dacacb32f0a4dfa453
304,919,748,719,413,030,000,000,000,000,000,000,000
31
[tflite] Ensure inputs and outputs don't overlap. If a model uses the same tensor for both an input and an output then this can result in data loss and memory corruption. This should not happen. PiperOrigin-RevId: 332522916 Change-Id: If0905b142415a9dfceaf2d181872f2a8fb88f48a
static BOOL update_read_multi_patblt_order(wStream* s, const ORDER_INFO* orderInfo, MULTI_PATBLT_ORDER* multi_patblt) { ORDER_FIELD_COORD(1, multi_patblt->nLeftRect); ORDER_FIELD_COORD(2, multi_patblt->nTopRect); ORDER_FIELD_COORD(3, multi_patblt->nWidth); ORDER_FIELD_COOR...
0
[ "CWE-125" ]
FreeRDP
17f547ae11835bb11baa3d045245dc1694866845
249,830,407,587,647,900,000,000,000,000,000,000,000
29
Fixed CVE-2020-11521: Out of bounds write in planar codec. Thanks to Sunglin and HuanGMz from Knownsec 404
TEST_F(NgramKernelTest, TestUnpaddedTrigramsWithPreserveShortAndEmptySequence) { MakeOp("|", {3}, "", "", 0, true); // Batch items are: // 0: "a", "b", "c", "d" // 1: "e", "f" AddInputFromArray<tstring>(TensorShape({6}), {"a", "b", "c", "d", "e", "f"}); AddInputFromArray<int64>(TensorShape({4}), {0, 4, 4, 6...
0
[ "CWE-703", "CWE-787" ]
tensorflow
ba424dd8f16f7110eea526a8086f1a155f14f22b
304,178,237,385,107,820,000,000,000,000,000,000,000
15
Enhance validation of ngram op and handle case of 0 tokens. PiperOrigin-RevId: 369940178 Change-Id: Ia82f42c09d14efe76e7dc013505b832a42282f0b
dp_packet_reset_packet(struct dp_packet *b, int off) { dp_packet_set_size(b, dp_packet_size(b) - off); dp_packet_set_data(b, ((unsigned char *) dp_packet_data(b) + off)); b->l2_5_ofs = b->l3_ofs = b->l4_ofs = UINT16_MAX; }
0
[ "CWE-400" ]
ovs
354e7d860e444fd1472541b0fdc3b8678aa74828
285,455,200,380,686,440,000,000,000,000,000,000,000
6
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
update_bar_address(struct vmctx *ctx, struct pci_vdev *dev, uint64_t addr, int idx, int type, bool ignore_reg_unreg) { bool decode = false; uint64_t orig_addr = dev->bar[idx].addr; if (!ignore_reg_unreg) { if (dev->bar[idx].type == PCIBAR_IO) decode = porten(dev); else decode = memen(dev); } if (decod...
0
[ "CWE-617", "CWE-703" ]
acrn-hypervisor
2b3dedfb9ba13f15887f22b935d373f36c9a59fa
185,942,430,570,163,570,000,000,000,000,000,000,000
41
dm: pci: clean up assert() in pci core Tracked-On: #3252 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
has_env_var(char_u *p) { for ( ; *p; MB_PTR_ADV(p)) { if (*p == '\\' && p[1] != NUL) ++p; else if (vim_strchr((char_u *) #if defined(MSWIN) "$%" #else "$" #endif , *p) != NULL) return TRUE; } return FALSE; }
0
[ "CWE-823", "CWE-703" ]
vim
5921aeb5741fc6e84c870d68c7c35b93ad0c9f87
190,848,442,756,803,100,000,000,000,000,000,000,000
17
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.
create_contentinfo(krb5_context context, pkinit_plg_crypto_context plg_crypto_context, ASN1_OBJECT *oid, unsigned char *data, size_t data_len, PKCS7 **out_p7) { krb5_error_code retval = EINVAL; PKCS7 *inner_p7; ASN1_TYPE *pkinit_data = NULL; *out...
0
[ "CWE-476" ]
krb5
f249555301940c6df3a2cdda13b56b5674eebc2e
294,377,994,601,164,800,000,000,000,000,000,000,000
39
PKINIT null pointer deref [CVE-2013-1415] Don't dereference a null pointer when cleaning up. The KDC plugin for PKINIT can dereference a null pointer when a malformed packet causes processing to terminate early, leading to a crash of the KDC process. An attacker would need to have a valid PKINIT certificate or have ...
inline std::string encode_codepoint(char32_t cp) { char buff[4]; auto l = encode_codepoint(cp, buff); return std::string(buff, l); }
0
[ "CWE-125" ]
cpp-peglib
b3b29ce8f3acf3a32733d930105a17d7b0ba347e
123,654,042,564,455,230,000,000,000,000,000,000,000
5
Fix #122
static int busytime_by_collection(char *mboxname, int matchlen, int maycreate, void *rock) { struct propfind_ctx *fctx = (struct propfind_ctx *) rock; struct calquery_filter *calfilter = (struct calquery_filter *) fctx->filter_crit; if (calfilter && (calfilter->flags & CHECK_CAL_TRANSP)) { /* Check...
0
[ "CWE-787" ]
cyrus-imapd
a5779db8163b99463e25e7c476f9cbba438b65f3
227,209,938,783,854,580,000,000,000,000,000,000,000
24
HTTP: don't overrun buffer when parsing strings with sscanf()
int nfc_data_exchange(struct nfc_dev *dev, u32 target_idx, struct sk_buff *skb, data_exchange_cb_t cb, void *cb_context) { int rc; pr_debug("dev_name=%s target_idx=%u skb->len=%u\n", dev_name(&dev->dev), target_idx, skb->len); device_lock(&dev->dev); if (!device_is_registered(&dev->dev)) { rc = -ENO...
1
[ "CWE-416" ]
linux
da5c0f119203ad9728920456a0f52a6d850c01cd
36,693,942,393,733,290,000,000,000,000,000,000,000
45
nfc: replace improper check device_is_registered() in netlink related functions The device_is_registered() in nfc core is used to check whether nfc device is registered in netlink related functions such as nfc_fw_download(), nfc_dev_up() and so on. Although device_is_registered() is protected by device_lock, there is ...
static struct aspeed_lpc_ctrl *file_aspeed_lpc_ctrl(struct file *file) { return container_of(file->private_data, struct aspeed_lpc_ctrl, miscdev); }
0
[]
linux
b49a0e69a7b1a68c8d3f64097d06dabb770fec96
29,321,409,636,083,940,000,000,000,000,000,000,000
5
soc: aspeed: lpc-ctrl: Fix boundary check for mmap The check mixes pages (vm_pgoff) with bytes (vm_start, vm_end) on one side of the comparison, and uses resource address (rather than just the resource size) on the other side of the comparison. This can allow malicious userspace to easily bypass the boundary check and...
void trace_syscall(struct pt_regs *regs) { printk("Task: %p(%d), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n", current, current->pid, regs->nip, regs->link, regs->gpr[0], regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted()); }
0
[ "CWE-241", "CWE-19" ]
linux
6c4841c2b6c32a134f9f36e5e08857138cc12b10
191,585,932,191,422,120,000,000,000,000,000,000,000
6
[POWERPC] Never panic when taking altivec exceptions from userspace At the moment we rely on a cpu feature bit or a firmware property to detect altivec. If we dont have either of these and the cpu does in fact support altivec we can cause a panic from userspace. It seems safer to always send a signal if we manage to ...
void Magick::Image::gaussianBlur(const double radius_,const double sigma_) { MagickCore::Image *newImage; GetPPException; newImage=GaussianBlurImage(constImage(),radius_,sigma_,exceptionInfo); replaceImage(newImage); ThrowImageException; }
0
[ "CWE-416" ]
ImageMagick
8c35502217c1879cb8257c617007282eee3fe1cc
259,626,673,010,451,370,000,000,000,000,000,000,000
10
Added missing return to avoid use after free.
void imap_munge_mbox_name(bool unicode, char *dest, size_t dlen, const char *src) { char *buf = mutt_str_dup(src); imap_utf_encode(unicode, &buf); imap_quote_string(dest, dlen, buf, false); FREE(&buf); }
0
[ "CWE-125" ]
neomutt
fa1db5785e5cfd9d3cd27b7571b9fe268d2ec2dc
331,779,400,947,477,400,000,000,000,000,000,000,000
9
Fix seqset iterator when it ends in a comma If the seqset ended with a comma, the substr_end marker would be just before the trailing nul. In the next call, the loop to skip the marker would iterate right past the end of string too. The fix is simple: place the substr_end marker and skip past it immediately.
int bt_procfs_init(struct net *net, const char *name, struct bt_sock_list* sk_list, int (* seq_show)(struct seq_file *, void *)) { return 0; }
0
[ "CWE-20", "CWE-269" ]
linux
f3d3342602f8bcbf37d7c46641cb9bca7618eb1c
96,987,514,698,007,960,000,000,000,000,000,000,000
6
net: rework recvmsg handler msg_name and msg_namelen logic This patch now always passes msg->msg_namelen as 0. recvmsg handlers must set msg_namelen to the proper size <= sizeof(struct sockaddr_storage) to return msg_name to the user. This prevents numerous uninitialized memory leaks we had in the recvmsg handlers an...
drv_initcolor(TERMINAL_CONTROL_BLOCK * TCB, int color, int r, int g, int b) { SCREEN *sp = TCB->csp; AssertTCB(); if (initialize_color != NULL) { NCURSES_PUTP2("initialize_color", TPARM_4(initialize_color, color, r, g, b)); } }
1
[]
ncurses
790a85dbd4a81d5f5d8dd02a44d84f01512ef443
83,197,709,061,656,870,000,000,000,000,000,000,000
11
ncurses 6.2 - patch 20200531 + correct configure version-check/warnng for g++ to allow for 10.x + re-enable "bel" in konsole-base (report by Nia Huang) + add linux-s entry (patch by Alexandre Montaron). + drop long-obsolete convert_configure.pl + add test/test_parm.c, for checking tparm changes. + improve parameter-ch...
static int kvaser_usb_leaf_set_opt_mode(const struct kvaser_usb_net_priv *priv) { struct kvaser_cmd *cmd; int rc; cmd = kmalloc(sizeof(*cmd), GFP_KERNEL); if (!cmd) return -ENOMEM; cmd->id = CMD_SET_CTRL_MODE; cmd->len = CMD_HEADER_LEN + sizeof(struct kvaser_cmd_ctrl_mode); cmd->u.ctrl_mode.tid = 0xff; cmd-...
1
[ "CWE-200", "CWE-908" ]
linux
da2311a6385c3b499da2ed5d9be59ce331fa93e9
248,983,503,380,193,940,000,000,000,000,000,000,000
24
can: kvaser_usb: kvaser_usb_leaf: Fix some info-leaks to USB devices Uninitialized Kernel memory can leak to USB devices. Fix this by using kzalloc() instead of kmalloc(). Signed-off-by: Xiaolong Huang <butterflyhuangxx@gmail.com> Fixes: 7259124eac7d ("can: kvaser_usb: Split driver into kvaser_usb_core.c and kvaser_...
static bool ieee80211_tx_pending_skb(struct ieee80211_local *local, struct sk_buff *skb) { struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); struct ieee80211_sub_if_data *sdata; struct sta_info *sta; struct ieee80211_hdr *hdr; bool result; struct ieee80211_chanctx_conf *chanctx_conf; sdata = vif_...
0
[ "CWE-476" ]
linux
bddc0c411a45d3718ac535a070f349be8eca8d48
281,659,193,421,862,200,000,000,000,000,000,000,000
44
mac80211: Fix NULL ptr deref for injected rate info The commit cb17ed29a7a5 ("mac80211: parse radiotap header when selecting Tx queue") moved the code to validate the radiotap header from ieee80211_monitor_start_xmit to ieee80211_parse_tx_radiotap. This made is possible to share more code with the new Tx queue selecti...
static void core_anal_bytes(RCore *core, const ut8 *buf, int len, int nops, int fmt) { int stacksize = r_config_get_i (core->config, "esil.stack.depth"); bool iotrap = r_config_get_i (core->config, "esil.iotrap"); bool romem = r_config_get_i (core->config, "esil.romem"); bool stats = r_config_get_i (core->config, "...
0
[ "CWE-416", "CWE-908" ]
radare2
9d348bcc2c4bbd3805e7eec97b594be9febbdf9a
312,420,198,061,926,700,000,000,000,000,000,000,000
295
Fix #9943 - Invalid free on RAnal.avr
static int io_send(struct io_kiocb *req, unsigned int issue_flags) { struct io_sr_msg *sr = &req->sr_msg; struct msghdr msg; struct iovec iov; struct socket *sock; unsigned flags; int min_ret = 0; int ret; sock = sock_from_file(req->file); if (unlikely(!sock)) return -ENOTSOCK; ret = import_single_range(W...
0
[ "CWE-125" ]
linux
89c2b3b74918200e46699338d7bcc19b1ea12110
249,990,028,147,868,350,000,000,000,000,000,000,000
41
io_uring: reexpand under-reexpanded iters [ 74.211232] BUG: KASAN: stack-out-of-bounds in iov_iter_revert+0x809/0x900 [ 74.212778] Read of size 8 at addr ffff888025dc78b8 by task syz-executor.0/828 [ 74.214756] CPU: 0 PID: 828 Comm: syz-executor.0 Not tainted 5.14.0-rc3-next-20210730 #1 [ 74.216525] Hardware n...
int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id, unsigned int id_len) { /* A quick examination of SSL_SESSION_hash and SSL_SESSION_cmp shows how * we can "construct" a session to give us the desired check - ie. to * find if there's a session in the hash table that would conflict with ...
0
[]
openssl
ee2ffc279417f15fef3b1073c7dc81a908991516
87,757,789,172,579,200,000,000,000,000,000,000,000
33
Add Next Protocol Negotiation.
void gfs2_rgrp_dump(struct seq_file *seq, const struct gfs2_glock *gl) { struct gfs2_rgrpd *rgd = gl->gl_object; struct gfs2_blkreserv *trs; const struct rb_node *n; if (rgd == NULL) return; gfs2_print_dbg(seq, " R: n:%llu f:%02x b:%u/%u i:%u r:%u e:%u\n", (unsigned long long)rgd->rd_addr, rgd->rd_flag...
0
[ "CWE-416" ]
linux
36e4ad0316c017d5b271378ed9a1c9a4b77fab5f
34,495,454,581,529,167,000,000,000,000,000,000,000
19
GFS2: don't set rgrp gl_object until it's inserted into rgrp tree Before this patch, function read_rindex_entry would set a rgrp glock's gl_object pointer to itself before inserting the rgrp into the rgrp rbtree. The problem is: if another process was also reading the rgrp in, and had already inserted its newly create...
ppp_bsdos_if_print(netdissect_options *ndo _U_, const struct pcap_pkthdr *h _U_, register const u_char *p _U_) { register int hdrlength; #ifdef __bsdi__ register u_int length = h->len; register u_int caplen = h->caplen; uint16_t ptype; const u_char *q; int i; if (caplen < PPP_BSDI_HDRLEN) { ...
0
[ "CWE-119" ]
tcpdump
0f95d441e4b5d7512cc5c326c8668a120e048eda
75,524,335,506,301,320,000,000,000,000,000,000,000
150
Do bounds checking when unescaping PPP. Clean up a const issue while we're at it.
yang_check_enum(struct ly_ctx *ctx, struct yang_type *typ, struct lys_type_enum *enm, int64_t *value, int assign) { int i, j; if (!assign) { /* assign value automatically */ if (*value > INT32_MAX) { LOGVAL(ctx, LYE_INARG, LY_VLOG_NONE, NULL, "2147483648", "enum/value"); ...
0
[ "CWE-415" ]
libyang
d9feacc4a590d35dbc1af21caf9080008b4450ed
121,499,312,536,412,900,000,000,000,000,000,000,000
35
yang parser BUGFIX double free Fixes #742
const char* MACH0_(get_intrp)(struct MACH0_(obj_t)* bin) { return bin? bin->intrp: NULL; }
0
[ "CWE-415", "CWE-125" ]
radare2
60208765887f5f008b3b9a883f3addc8bdb9c134
92,855,059,108,014,770,000,000,000,000,000,000,000
3
Fix #9970 - heap oobread in mach0 parser (#10026)
dp_packet_batch_clone(struct dp_packet_batch *dst, struct dp_packet_batch *src) { struct dp_packet *packet; dp_packet_batch_init(dst); DP_PACKET_BATCH_FOR_EACH (i, packet, src) { if (i + 1 < dp_packet_batch_size(src)) { OVS_PREFETCH(src->packets[i + 1]); } ...
0
[ "CWE-400" ]
ovs
79349cbab0b2a755140eedb91833ad2760520a83
143,724,708,835,375,180,000,000,000,000,000,000,000
19
flow: Support extra padding length. Although not required, padding can be optionally added until the packet length is MTU bytes. A packet with extra padding currently fails sanity checks. Vulnerability: CVE-2020-35498 Fixes: fa8d9001a624 ("miniflow_extract: Properly handle small IP packets.") Reported-by: Joakim Hind...
bool HaarEvaluator::read(const FileNode& node, Size _origWinSize) { if (!FeatureEvaluator::read(node, _origWinSize)) return false; size_t i, n = node.size(); CV_Assert(n > 0); if(features.empty()) features = makePtr<std::vector<Feature> >(); if(optfeatures.empty()) optfeature...
1
[ "CWE-125" ]
opencv
321c74ccd6077bdea1d47450ca4fe955cb5b6330
172,417,011,934,223,440,000,000,000,000,000,000,000
44
objdetect: validate feature rectangle on reading
static int nfs4_xdr_dec_lookup(struct rpc_rqst *rqstp, struct xdr_stream *xdr, void *data) { struct nfs4_lookup_res *res = data; struct compound_hdr hdr; int status; status = decode_compound_hdr(xdr, &hdr); if (status) goto out; status = decode_sequence(xdr, &res->seq_res, rqstp); if (status) goto...
0
[ "CWE-787" ]
linux
b4487b93545214a9db8cbf32e86411677b0cca21
174,180,026,105,582,740,000,000,000,000,000,000,000
26
nfs: Fix getxattr kernel panic and memory overflow Move the buffer size check to decode_attr_security_label() before memcpy() Only call memcpy() if the buffer is large enough Fixes: aa9c2669626c ("NFS: Client implementation of Labeled-NFS") Signed-off-by: Jeffrey Mitchell <jeffrey.mitchell@starlab.io> [Trond: clean u...
int main(int argc, char** argv) { /* Kernel starts us with all fd's closed. * But it's dangerous: * fprintf(stderr) can dump messages into random fds, etc. * Ensure that if any of fd 0,1,2 is closed, we open it to /dev/null. */ int fd = xopen("/dev/null", O_RDWR); while (fd < 2) fd = xd...
1
[ "CWE-59" ]
abrt
a4794b39efc62c9ba92b38b419de3babbbcd8cfb
131,579,515,751,293,770,000,000,000,000,000,000,000
422
ccpp: postpone changing ownership of new dump directories Florian Weimer <fweimer@redhat.com>: Currently, dd_create changes ownership of the directory immediately, when it is still empty. This means that any operations within the directory (which happen as the root user) can race with changes to the d...
signed char base64_decode_value(signed char value_in) { static const signed char decoding[] = { 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -2, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26...
0
[ "CWE-119", "CWE-787" ]
frr
ac3133450de12ba86c051265fc0f1b12bc57b40c
225,257,013,526,743,000,000,000,000,000,000,000,000
19
isisd: fix #10505 using base64 encoding Using base64 instead of the raw string to encode the binary data. Signed-off-by: whichbug <whichbug@github.com>
static ssize_t active_time_ms_show(struct device *dev, struct device_attribute *attr, char *buf) { struct wakeup_source *ws = dev_get_drvdata(dev); ktime_t active_time = ws->active ? ktime_sub(ktime_get(), ws->last_time) : 0; return sysfs_emit(buf, "%lld\n", ktime_to_ms(active_time)); }
0
[ "CWE-787" ]
linux
aa838896d87af561a33ecefea1caa4c15a68bc47
298,767,196,084,435,800,000,000,000,000,000,000,000
9
drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions Convert the various sprintf fmaily calls in sysfs device show functions to sysfs_emit and sysfs_emit_at for PAGE_SIZE buffer safety. Done with: $ spatch -sp-file sysfs_emit_dev.cocci --in-place --max-width=80 . And cocci script: $ cat s...
__vma_link(struct mm_struct *mm, struct vm_area_struct *vma, struct vm_area_struct *prev, struct rb_node **rb_link, struct rb_node *rb_parent) { __vma_link_list(mm, vma, prev); __vma_link_rb(mm, vma, rb_link, rb_parent); }
0
[ "CWE-787" ]
linux
dcde237319e626d1ec3c9d8b7613032f0fd4663a
298,654,179,086,118,720,000,000,000,000,000,000,000
7
mm: Avoid creating virtual address aliases in brk()/mmap()/mremap() Currently the arm64 kernel ignores the top address byte passed to brk(), mmap() and mremap(). When the user is not aware of the 56-bit address limit or relies on the kernel to return an error, untagging such pointers has the potential to create addres...
entry_guards_update_state(or_state_t *state) { entry_guards_dirty = 0; // Handles all guard info. entry_guards_update_guards_in_state(state); entry_guards_dirty = 0; if (!get_options()->AvoidDiskWrites) or_state_mark_dirty(get_or_state(), 0); entry_guards_dirty = 0; }
0
[ "CWE-200" ]
tor
665baf5ed5c6186d973c46cdea165c0548027350
280,670,923,555,505,100,000,000,000,000,000,000,000
13
Consider the exit family when applying guard restrictions. When the new path selection logic went into place, I accidentally dropped the code that considered the _family_ of the exit node when deciding if the guard was usable, and we didn't catch that during code review. This patch makes the guard_restriction_t code ...
static int fib6_clean_tohost(struct rt6_info *rt, void *arg) { struct in6_addr *gateway = (struct in6_addr *)arg; if ((((rt->rt6i_flags & RTF_RA_ROUTER) == RTF_RA_ROUTER) || ((rt->rt6i_flags & RTF_CACHE_GATEWAY) == RTF_CACHE_GATEWAY)) && ipv6_addr_equal(gateway, &rt->rt6i_gateway)) { return -1; } ret...
0
[ "CWE-17" ]
linux-stable
9d289715eb5c252ae15bd547cb252ca547a3c4f2
307,791,732,228,176,230,000,000,000,000,000,000,000
11
ipv6: stop sending PTB packets for MTU < 1280 Reduce the attack vector and stop generating IPv6 Fragment Header for paths with an MTU smaller than the minimum required IPv6 MTU size (1280 byte) - called atomic fragments. See IETF I-D "Deprecating the Generation of IPv6 Atomic Fragments" [1] for more information and h...
static struct kvm *kvm_create_vm(void) { int r, i; struct kvm *kvm = kvm_arch_alloc_vm(); if (!kvm) return ERR_PTR(-ENOMEM); r = kvm_arch_init_vm(kvm); if (r) goto out_err_nodisable; r = hardware_enable_all(); if (r) goto out_err_nodisable; #ifdef CONFIG_HAVE_KVM_IRQCHIP INIT_HLIST_HEAD(&kvm->mask_not...
0
[ "CWE-20", "CWE-787" ]
linux
fa3d315a4ce2c0891cdde262562e710d95fba19e
26,326,589,110,041,260,000,000,000,000,000,000,000
63
KVM: Validate userspace_addr of memslot when registered This way, we can avoid checking the user space address many times when we read the guest memory. Although we can do the same for write if we check which slots are writable, we do not care write now: reading the guest memory happens more often than writing. [avi...
\param reinit_path Force path to be recalculated (may take some time). \return Path containing the \c gunzip binary. **/ inline const char *gunzip_path(const char *const user_path, const bool reinit_path) { static CImg<char> s_path; cimg::mutex(7); if (reinit_path) s_path.assign(...
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
155,818,007,261,305,050,000,000,000,000,000,000,000
30
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
qtdemux_add_container_format (GstQTDemux * qtdemux, GstTagList * tags) { const gchar *fmt; if (tags == NULL) { tags = gst_tag_list_new_empty (); gst_tag_list_set_scope (tags, GST_TAG_SCOPE_GLOBAL); } if (qtdemux->major_brand == FOURCC_mjp2) fmt = "Motion JPEG 2000"; else if ((qtdemux->major_bran...
0
[ "CWE-125" ]
gst-plugins-good
d0949baf3dadea6021d54abef6802fed5a06af75
232,941,439,958,053,070,000,000,000,000,000,000,000
28
qtdemux: Fix out of bounds read in tag parsing code We can't simply assume that the length of the tag value as given inside the stream is correct but should also check against the amount of data we have actually available. https://bugzilla.gnome.org/show_bug.cgi?id=775451
int workqueue_online_cpu(unsigned int cpu) { struct worker_pool *pool; struct workqueue_struct *wq; int pi; mutex_lock(&wq_pool_mutex); for_each_pool(pool, pi) { mutex_lock(&pool->attach_mutex); if (pool->cpu == cpu) rebind_workers(pool); else if (pool->cpu < 0) restore_unbound_workers_cpumask(pool,...
0
[ "CWE-200" ]
tip
dfb4357da6ddbdf57d583ba64361c9d792b0e0b1
18,708,865,927,722,220,000,000,000,000,000,000,000
26
time: Remove CONFIG_TIMER_STATS Currently CONFIG_TIMER_STATS exposes process information across namespaces: kernel/time/timer_list.c print_timer(): SEQ_printf(m, ", %s/%d", tmp, timer->start_pid); /proc/timer_list: #11: <0000000000000000>, hrtimer_wakeup, S:01, do_nanosleep, cron/2570 Given that the trac...
static journal_t *ext4_get_dev_journal(struct super_block *sb, dev_t j_dev) { struct buffer_head *bh; journal_t *journal; ext4_fsblk_t start; ext4_fsblk_t len; int hblock, blocksize; ext4_fsblk_t sb_block; unsigned long offset; struct ext4_super_block *es; struct block_device *bdev; BUG_ON(!ext4_h...
0
[ "CWE-362" ]
linux
ea3d7209ca01da209cda6f0dea8be9cc4b7a933b
112,332,192,078,460,020,000,000,000,000,000,000,000
94
ext4: fix races between page faults and hole punching Currently, page faults and hole punching are completely unsynchronized. This can result in page fault faulting in a page into a range that we are punching after truncate_pagecache_range() has been called and thus we can end up with a page mapped to disk blocks that...
static void set_up_range_analysis_info(partition_info *part_info) { /* Set the catch-all default */ part_info->get_part_iter_for_interval= NULL; part_info->get_subpart_iter_for_interval= NULL; /* Check if get_part_iter_for_interval_via_mapping() can be used for partitioning */ switch (part_info->...
0
[]
mysql-server
be901b60ae59c93848c829d1b0b2cb523ab8692e
119,316,928,183,977,090,000,000,000,000,000,000,000
74
Bug#26390632: CREATE TABLE CAN CAUSE MYSQL TO EXIT. Analysis ======== CREATE TABLE of InnoDB table with a partition name which exceeds the path limit can cause the server to exit. During the preparation of the partition name, there was no check to identify whether the complete path name for partition exceeds the max ...
static int tg3_set_channels(struct net_device *dev, struct ethtool_channels *channel) { struct tg3 *tp = netdev_priv(dev); if (!tg3_flag(tp, SUPPORT_MSIX)) return -EOPNOTSUPP; if (channel->rx_count > tp->rxq_max || channel->tx_count > tp->txq_max) return -EINVAL; tp->rxq_req = channel->rx_count; ...
0
[ "CWE-476", "CWE-119" ]
linux
715230a44310a8cf66fbfb5a46f9a62a9b2de424
62,083,424,720,120,030,000,000,000,000,000,000,000
26
tg3: fix length overflow in VPD firmware parsing Commit 184b89044fb6e2a74611dafa69b1dce0d98612c6 ("tg3: Use VPD fw version when present") introduced VPD parsing that contained a potential length overflow. Limit the hardware's reported firmware string length (max 255 bytes) to stay inside the driver's firmware string ...
vips_foreign_load( const char *name, VipsImage **out, ... ) { char filename[VIPS_PATH_MAX]; char option_string[VIPS_PATH_MAX]; const char *operation_name; va_list ap; int result; vips__filename_split8( name, filename, option_string ); if( !(operation_name = vips_foreign_find_load( filename )) ) return( -1 ); ...
0
[ "CWE-362", "CWE-476" ]
libvips
20d840e6da15c1574b3ed998bc92f91d1e36c2a5
32,715,542,894,598,830,000,000,000,000,000,000,000
19
fix a crash with delayed load If a delayed load failed, it could leave the pipeline only half-set up. Sebsequent threads could then segv. Set a load-has-failed flag and test before generate. See https://github.com/jcupitt/libvips/issues/893
ssl_error(agooErr err, const char *filename, int line) { char buf[224]; unsigned long e = ERR_get_error(); ERR_error_string_n(e, buf, sizeof(buf)); return agoo_err_set(err, AGOO_ERR_TLS, "%s at %s:%d", buf, filename, line); }
0
[ "CWE-444", "CWE-61" ]
agoo
23d03535cf7b50d679a60a953a0cae9519a4a130
122,995,046,631,830,950,000,000,000,000,000,000,000
8
Remote addr (#99) * REMOTE_ADDR added * Ready for merge
static BOOL rdp_print_large_pointer_capability_set(wStream* s, UINT16 length) { UINT16 largePointerSupportFlags; WLog_INFO(TAG, "LargePointerCapabilitySet (length %" PRIu16 "):", length); if (length < 6) return FALSE; Stream_Read_UINT16(s, largePointerSupportFlags); /* largePointerSupportFlags (2 bytes) */ WLo...
0
[ "CWE-119", "CWE-125" ]
FreeRDP
3627aaf7d289315b614a584afb388f04abfb5bbf
339,958,623,772,639,300,000,000,000,000,000,000,000
12
Fixed #6011: Bounds check in rdp_read_font_capability_set
int test_gf2m_mod_mul(BIO *bp, BN_CTX *ctx) { BIGNUM *a, *b[2], *c, *d, *e, *f, *g, *h; int i, j, ret = 0; int p0[] = { 163, 7, 6, 3, 0, -1 }; int p1[] = { 193, 15, 0, -1 }; a = BN_new(); b[0] = BN_new(); b[1] = BN_new(); c = BN_new(); d = BN_new(); e = BN_new(); f = BN_new(...
0
[ "CWE-200" ]
openssl
d73cc256c8e256c32ed959456101b73ba9842f72
314,672,434,594,952,120,000,000,000,000,000,000,000
67
bn/asm/x86_64-mont5.pl: fix carry propagating bug (CVE-2015-3193). Reviewed-by: Richard Levitte <levitte@openssl.org> (cherry picked from commit e7c078db57908cbf16074c68034977565ffaf107)
BlockDriverState *bdrv_new(const char *device_name) { BlockDriverState *bs; bs = g_malloc0(sizeof(BlockDriverState)); QLIST_INIT(&bs->dirty_bitmaps); pstrcpy(bs->device_name, sizeof(bs->device_name), device_name); if (device_name[0] != '\0') { QTAILQ_INSERT_TAIL(&bdrv_states, bs, device_lis...
0
[ "CWE-190" ]
qemu
8f4754ede56e3f9ea3fd7207f4a7c4453e59285b
170,252,245,860,790,300,000,000,000,000,000,000,000
19
block: Limit request size (CVE-2014-0143) Limiting the size of a single request to INT_MAX not only fixes a direct integer overflow in bdrv_check_request() (which would only trigger bad behaviour with ridiculously huge images, as in close to 2^64 bytes), but can also prevent overflows in all block drivers. Signed-off...
e_mail_parser_get_type (void) { static GType type = 0; if (G_UNLIKELY (type == 0)) { static const GTypeInfo type_info = { sizeof (EMailParserClass), (GBaseInitFunc) e_mail_parser_base_init, (GBaseFinalizeFunc) NULL, (GClassInitFunc) e_mail_parser_class_init, (GClassFinalizeFunc) NULL, NULL, /* c...
0
[ "CWE-347" ]
evolution
9c55a311325f5905d8b8403b96607e46cf343f21
280,805,393,619,420,930,000,000,000,000,000,000,000
25
I#120 - Show security bar above message headers Closes https://gitlab.gnome.org/GNOME/evolution/issues/120
bool_t auth_gssapi_seal_seq( gss_ctx_id_t context, uint32_t seq_num, gss_buffer_t out_buf) { gss_buffer_desc in_buf; OM_uint32 gssstat, minor_stat; uint32_t nl_seq_num; nl_seq_num = htonl(seq_num); in_buf.length = sizeof(uint32_t); in_buf.value = (char *) &nl_seq_num; ...
0
[ "CWE-703" ]
krb5
a197e92349a4aa2141b5dff12e9dd44c2a2166e3
74,570,841,504,240,100,000,000,000,000,000,000,000
23
Fix kadm5/gssrpc XDR double free [CVE-2014-9421] [MITKRB5-SA-2015-001] In auth_gssapi_unwrap_data(), do not free partial deserialization results upon failure to deserialize. This responsibility belongs to the callers, svctcp_getargs() and svcudp_getargs(); doing it in the unwrap function results in freeing the result...
build_gs_simple_font(i_ctx_t *i_ctx_p, os_ptr op, gs_font_base ** ppfont, font_type ftype, gs_memory_type_ptr_t pstype, const build_proc_refs * pbuild, build_font_options_t options) { double bbox[4]; gs_uid uid; int code; gs_font_base *pfont...
0
[ "CWE-704" ]
ghostpdl
548bb434e81dadcc9f71adf891a3ef5bea8e2b4e
243,404,326,485,646,660,000,000,000,000,000,000,000
43
PS interpreter - add some type checking These were 'probably' safe anyway, since they mostly treat the objects as integers without checking, which at least can't result in a crash. Nevertheless, we ought to check. The return from comparedictkeys could be wrong if one of the keys had a value which was not an array, i...
static int vhost_user_set_vring_err(struct virtio_net **pdev __rte_unused, struct VhostUserMsg *msg, int main_fd __rte_unused) { int expected_fds; expected_fds = (msg->payload.u64 & VHOST_USER_VRING_NOFD_MASK) ? 0 : 1; if (validate_msg_fds(msg, expected_fds) != 0) return RTE_VHOST_MSG_RESULT_ERR; if (!(ms...
0
[ "CWE-190" ]
dpdk
3ae4beb079ce242240c34376a066bbccd0c0b23e
83,363,777,789,561,230,000,000,000,000,000,000,000
16
vhost: check log mmap offset and size overflow vhost_user_set_log_base() is a message handler that is called to handle the VHOST_USER_SET_LOG_BASE message. Its payload contains a 64 bit size and offset. Both are added up and used as a size when calling mmap(). There is no integer overflow check. If an integer overflo...
controller::~controller() { delete rsscache; delete urlcfg; delete api; std::lock_guard<std::mutex> feedslock(feeds_mutex); for (auto feed : feeds) { std::lock_guard<std::mutex> lock(feed->item_mutex); feed->clear_items(); } feeds.clear(); }
0
[ "CWE-943", "CWE-787" ]
newsbeuter
96e9506ae9e252c548665152d1b8968297128307
173,152,753,743,997,000,000,000,000,000,000,000,000
12
Sanitize inputs to bookmark-cmd (#591) Newsbeuter didn't properly shell-escape the arguments passed to bookmarking command, which allows a remote attacker to perform remote code execution by crafting an RSS item whose title and/or URL contain something interpretable by the shell (most notably subshell invocations.) T...
(*get_decode_color(gx_device * dev))(gx_device *, gx_color_index, gx_color_value *) { /* if a method has already been provided, use it */ if (dev_proc(dev, decode_color) != 0) return dev_proc(dev, decode_color); /* * If a map_color_rgb method has been provided, we may be able to use it. *...
0
[]
ghostpdl
c9b362ba908ca4b1d7c72663a33229588012d7d9
233,286,928,964,776,900,000,000,000,000,000,000,000
60
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...
explicit CImg(const CImgDisplay &disp):_width(0),_height(0),_depth(0),_spectrum(0),_is_shared(false),_data(0) { disp.snapshot(*this); }
0
[ "CWE-770" ]
cimg
619cb58dd90b4e03ac68286c70ed98acbefd1c90
108,819,093,027,680,180,000,000,000,000,000,000,000
3
CImg<>::load_bmp() and CImg<>::load_pandore(): Check that dimensions encoded in file does not exceed file size.
poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter) { GooString *name; FontInfo *info; info = (FontInfo *)iter->items->get (iter->index); name = info->getSubstituteName(); if (name != nullptr) { return name->getCString(); } else { return nullptr; } }
0
[ "CWE-476" ]
poppler
f162ecdea0dda5dbbdb45503c1d55d9afaa41d44
177,170,937,555,155,740,000,000,000,000,000,000,000
14
Fix crash on missing embedded file Check whether an embedded file is actually present in the PDF and show warning in that case. https://bugs.freedesktop.org/show_bug.cgi?id=106137 https://gitlab.freedesktop.org/poppler/poppler/issues/236
sys_rt_sigreturn(unsigned long r0, unsigned long r1, unsigned long r2, unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, struct pt_regs *regs) { struct rt_sigframe __user *frame = (struct rt_sigframe __user *)regs->spu; sigset_t set; int result; if (!access_ok(VERIFY_READ, frame, sizeof...
0
[]
linux-2.6
ee18d64c1f632043a02e6f5ba5e045bb26a5465f
125,109,604,570,033,060,000,000,000,000,000,000,000
31
KEYS: Add a keyctl to install a process's session keyring on its parent [try #6] Add a keyctl to install a process's session keyring onto its parent. This replaces the parent's session keyring. Because the COW credential code does not permit one process to change another process's credentials directly, the change is...
unsigned int BitsBuffered() const {return m_bitsBuffered;}
0
[ "CWE-190", "CWE-125" ]
cryptopp
07dbcc3d9644b18e05c1776db2a57fe04d780965
27,348,511,564,162,200,000,000,000,000,000,000,000
1
Add Inflator::BadDistanceErr exception (Issue 414) The improved validation and excpetion clears the Address Sanitizer and Undefined Behavior Sanitizer findings
void Gfx::fillPatch(GfxPatch *patch, int colorComps, int patchColorComps, double refineColorThreshold, int depth, GfxPatchMeshShading *shading) { GfxPatch patch00, patch01, patch10, patch11; double xx[4][8], yy[4][8]; double xxm, yym; int i; for (i = 0; i < patchColorComps; ++i) { // these comparisons ar...
0
[]
poppler
abf167af8b15e5f3b510275ce619e6fdb42edd40
28,017,582,724,980,220,000,000,000,000,000,000,000
135
Implement tiling/patterns in SplashOutputDev Fixes bug 13518
int TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions) { int i, critical, n; X509_EXTENSION *ex; ASN1_OBJECT *obj; BIO_printf(bio, "Extensions:\n"); n = X509v3_get_ext_count(extensions); for (i = 0; i < n; i++) { ex = X509v3_get_ext(extensions, i); obj = X509...
0
[ "CWE-125" ]
openssl
0ed26acce328ec16a3aa635f1ca37365e8c7403a
23,242,148,126,866,270,000,000,000,000,000,000,000
23
Fix OOB read in TS_OBJ_print_bio(). TS_OBJ_print_bio() misuses OBJ_txt2obj: it should print the result as a null terminated buffer. The length value returned is the total length the complete text reprsentation would need not the amount of data written. CVE-2016-2180 Thanks to Shi Lei for reporting this bug. Reviewe...
static void opj_pi_update_encode_not_poc(opj_cp_t *p_cp, OPJ_UINT32 p_num_comps, OPJ_UINT32 p_tileno, OPJ_UINT32 p_tx0, OPJ_UINT32 p_tx1, OPJ_UINT32 p_ty0, OPJ_UINT32 p_ty1, OPJ_UINT32 p_max_prec, OPJ_UINT32 p_max_res, OPJ_UINT32 p_dx_min, ...
0
[ "CWE-122" ]
openjpeg
00383e162ae2f8fc951f5745bf1011771acb8dce
315,204,680,248,301,100,000,000,000,000,000,000,000
54
pi.c: avoid out of bounds access with POC (refs https://github.com/uclouvain/openjpeg/issues/1293#issuecomment-737122836)
virtual Item *remove_item_direct_ref() { return this; }
0
[ "CWE-617" ]
server
807945f2eb5fa22e6f233cc17b85a2e141efe2c8
282,343,724,517,962,360,000,000,000,000,000,000,000
1
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 ...
static void psi_group_change(struct psi_group *group, int cpu, unsigned int clear, unsigned int set, u64 now, bool wake_clock) { struct psi_group_cpu *groupc; u32 state_mask = 0; unsigned int t, m; enum psi_states s; groupc = per_cpu_ptr(group->pcpu, cpu); /* * First we assess the aggregate re...
0
[ "CWE-416" ]
linux
a06247c6804f1a7c86a2e5398a4c1f1db1471848
144,651,329,701,671,500,000,000,000,000,000,000,000
69
psi: Fix uaf issue when psi trigger is destroyed while being polled With write operation on psi files replacing old trigger with a new one, the lifetime of its waitqueue is totally arbitrary. Overwriting an existing trigger causes its waitqueue to be freed and pending poll() will stumble on trigger->event_wait which w...
QPDFTokenizer::Token::Token(token_type_e type, std::string const& value) : type(type), value(value), raw_value(value) { if (type == tt_string) { raw_value = QPDFObjectHandle::newString(value).unparse(); } else if (type == tt_name) { raw_value = QPDFObjectHandle::newName(v...
0
[ "CWE-787" ]
qpdf
d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e
56,950,179,710,434,040,000,000,000,000,000,000,000
14
Fix sign and conversion warnings (major) This makes all integer type conversions that have potential data loss explicit with calls that do range checks and raise an exception. After this commit, qpdf builds with no warnings when -Wsign-conversion -Wconversion is used with gcc or clang or when -W3 -Wd4800 is used with ...
static int create_align_transfer_quirk(struct snd_usb_audio *chip, struct usb_interface *iface, struct usb_driver *driver, const struct snd_usb_audio_quirk *quirk) { chip->txfr_quirk = 1; return 1; /* Continue with creating streams and mixer */ }
0
[]
sound
0f886ca12765d20124bd06291c82951fd49a33be
40,201,391,268,037,740,000,000,000,000,000,000,000
8
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...
static int reverse_path_check_proc(void *priv, void *cookie, int call_nests) { int error = 0; struct file *file = priv; struct file *child_file; struct epitem *epi; list_for_each_entry(epi, &file->f_ep_links, fllink) { child_file = epi->ep->file; if (is_file_epoll(child_file)) { if (list_empty(&child_file-...
0
[]
linux-2.6
28d82dc1c4edbc352129f97f4ca22624d1fe61de
195,876,098,580,547,500,000,000,000,000,000,000,000
31
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...
bool ms_dispatch(Message *m) override { lderr(g_ceph_context) << __func__ << " conn: " << m->get_connection() << dendl; Mutex::Locker l(lock); count++; conns.insert(m->get_connection()); if (conns.size() < 2 && !last_mark) { m->put(); return true; } last_mark = true; uslee...
0
[ "CWE-287", "CWE-284" ]
ceph
5ead97120e07054d80623dada90a5cc764c28468
18,504,791,240,757,485,000,000,000,000,000,000,000
24
auth/cephx: add authorizer challenge Allow the accepting side of a connection to reject an initial authorizer with a random challenge. The connecting side then has to respond with an updated authorizer proving they are able to decrypt the service's challenge and that the new authorizer was produced for this specific ...
static int ethtool_set_tso(struct net_device *dev, char __user *useraddr) { struct ethtool_value edata; if (!dev->ethtool_ops->set_tso) return -EOPNOTSUPP; if (copy_from_user(&edata, useraddr, sizeof(edata))) return -EFAULT; if (edata.data && !(dev->features & NETIF_F_SG)) return -EINVAL; return dev->eth...
0
[ "CWE-190" ]
linux-2.6
db048b69037e7fa6a7d9e95a1271a50dc08ae233
71,948,370,422,909,980,000,000,000,000,000,000,000
15
ethtool: Fix potential kernel buffer overflow in ETHTOOL_GRXCLSRLALL On a 32-bit machine, info.rule_cnt >= 0x40000000 leads to integer overflow and the buffer may be smaller than needed. Since ETHTOOL_GRXCLSRLALL is unprivileged, this can presumably be used for at least denial of service. Signed-off-by: Ben Hutching...
const CString& CIRCNetwork::GetIRCServer() const { return m_sIRCServer; }
0
[ "CWE-20" ]
znc
64613bc8b6b4adf1e32231f9844d99cd512b8973
176,464,475,887,972,940,000,000,000,000,000,000,000
1
Don't crash if user specified invalid encoding. This is CVE-2019-9917
rb_str_squeeze(int argc, VALUE *argv, VALUE str) { str = rb_str_dup(str); rb_str_squeeze_bang(argc, argv, str); return str; }
0
[ "CWE-119" ]
ruby
1c2ef610358af33f9ded3086aa2d70aac03dcac5
193,512,089,504,144,500,000,000,000,000,000,000,000
6
* string.c (rb_str_justify): CVE-2009-4124. Fixes a bug reported by Emmanouel Kellinis <Emmanouel.Kellinis AT kpmg.co.uk>, KPMG London; Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
vte_sequence_handler_cursor_character_absolute (VteTerminal *terminal, GValueArray *params) { VteScreen *screen; GValue *value; long val; screen = terminal->pvt->screen; val = 0; if ((params != NULL) && (params->n_values > 0)) { value = g_value_array_get_nth(params, 0); if (G_VALUE_HOLDS_LONG(value))...
0
[]
vte
58bc3a942f198a1a8788553ca72c19d7c1702b74
140,969,640,427,074,230,000,000,000,000,000,000,000
20
fix bug #548272 svn path=/trunk/; revision=2365
static inline void preempt_conditional_cli(struct pt_regs *regs) { if (regs->flags & X86_EFLAGS_IF) local_irq_disable(); dec_preempt_count(); }
1
[ "CWE-400" ]
linux-stable-rt
e5d4e1c3ccee18c68f23d62ba77bda26e893d4f0
41,005,513,663,714,330,000,000,000,000,000,000,000
6
x86: Do not disable preemption in int3 on 32bit Preemption must be disabled before enabling interrupts in do_trap on x86_64 because the stack in use for int3 and debug is a per CPU stack set by th IST. But 32bit does not have an IST and the stack still belongs to the current task and there is no problem in scheduling ...
void rtl8xxxu_gen2_update_rate_mask(struct rtl8xxxu_priv *priv, u32 ramask, int sgi) { struct h2c_cmd h2c; u8 bw = 0; memset(&h2c, 0, sizeof(struct h2c_cmd)); h2c.b_macid_cfg.cmd = H2C_8723B_MACID_CFG_RAID; h2c.b_macid_cfg.ramask0 = ramask & 0xff; h2c.b_macid_cfg.ramask1 = (ramask >> 8) & 0xff; h2c.b_m...
0
[ "CWE-400", "CWE-401" ]
linux
a2cdd07488e666aa93a49a3fc9c9b1299e27ef3c
339,714,636,898,499,340,000,000,000,000,000,000,000
25
rtl8xxxu: prevent leaking urb In rtl8xxxu_submit_int_urb if usb_submit_urb fails the allocated urb should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Reviewed-by: Chris Chiu <chiu@endlessm.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
kill_server(char *prefix, char *pid_file) { char *path = NULL; int pid, path_size = strlen(prefix) + strlen(pid_file) + 2; path = ss_malloc(path_size); snprintf(path, path_size, "%s/%s", prefix, pid_file); FILE *f = fopen(path, "r"); if (f == NULL) { if (verbose) { LOGE("unab...
0
[ "CWE-78", "CWE-787" ]
shadowsocks-libev
c67d275803dc6ea22c558d06b1f7ba9f94cd8de3
194,205,240,690,727,170,000,000,000,000,000,000,000
21
Fix #1734
rfbNewTCPOrUDPClient(rfbScreenInfoPtr rfbScreen, int sock, rfbBool isUDP) { rfbProtocolVersionMsg pv; rfbClientIteratorPtr iterator; rfbClientPtr cl,cl_; #ifdef LIBVNCSERVER_IPv6 struct sockaddr_storage addr; #else struct sockaddr_in addr; #endif socklen...
0
[ "CWE-787" ]
libvncserver
502821828ed00b4a2c4bef90683d0fd88ce495de
163,123,041,999,271,780,000,000,000,000,000,000,000
206
LibVNCServer: fix heap out-of-bound write access Closes #243
int64_t qmp_guest_get_time(Error **errp) { SYSTEMTIME ts = {0}; FILETIME tf; GetSystemTime(&ts); if (ts.wYear < 1601 || ts.wYear > 30827) { error_setg(errp, "Failed to get time"); return -1; } if (!SystemTimeToFileTime(&ts, &tf)) { error_setg(errp, "Failed to convert sy...
0
[ "CWE-190" ]
qemu
141b197408ab398c4f474ac1a728ab316e921f2b
60,690,519,980,816,200,000,000,000,000,000,000,000
19
qga: check bytes count read by guest-file-read While reading file content via 'guest-file-read' command, 'qmp_guest_file_read' routine allocates buffer of count+1 bytes. It could overflow for large values of 'count'. Add check to avoid it. Reported-by: Fakhri Zulkifli <mohdfakhrizulkifli@gmail.com> Signed-off-by: Pra...
**/ CImg<T>& operator^=(const char *const expression) { return *this^=(+*this)._fill(expression,true,1,0,0,"operator^=",this);
0
[ "CWE-119", "CWE-787" ]
CImg
ac8003393569aba51048c9d67e1491559877b1d1
69,583,878,382,166,340,000,000,000,000,000,000,000
3
.
int rename_noreplace (int olddirfd, const char *oldpath, int newdirfd, const char *newpath) { int ret; # ifdef SYS_renameat2 # ifndef RENAME_NOREPLACE # define RENAME_NOREPLACE (1 << 0) # endif ret = (int) syscall (SYS_renameat2, olddirfd, oldpath, newdirfd, newpath, RENAME_NOREPLACE); if (ret == 0 || errno...
0
[]
libpod
d400f0b5b2d68c4148a7c173e7fbbfd9b377a660
219,778,064,459,433,340,000,000,000,000,000,000,000
25
rootless: fix segfault when open fd >= FD_SETSIZE if there are more than FD_SETSIZE open fds passed down to the Podman process, the initialization code could crash as it attempts to store them into a fd_set. Use an array of fd_set structs, each of them holding only FD_SETSIZE file descriptors. Signed-off-by: Giusepp...
static int bnep_net_set_mac_addr(struct net_device *dev, void *arg) { BT_DBG("%s", dev->name); return 0; }
0
[ "CWE-703", "CWE-264" ]
linux
550fd08c2cebad61c548def135f67aba284c6162
4,592,543,407,195,099,500,000,000,000,000,000,000
5
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...
write_fatal (void) { pfatal ("write error"); }
0
[ "CWE-22" ]
patch
685a78b6052f4df6eac6d625a545cfb54a6ac0e1
272,929,489,188,690,260,000,000,000,000,000,000,000
4
Do not let a malicious patch create files above current directory This addresses CVE-2010-4651, reported by Jakub Wilk. https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2010-4651 * src/util.c (strip_leading_slashes): Reject absolute file names and file names containing a component of "..". * tests/bad-filenames: New fi...
static int i40e_veb_mem_alloc(struct i40e_pf *pf) { int ret = -ENOENT; struct i40e_veb *veb; int i; /* Need to protect the allocation of switch elements at the PF level */ mutex_lock(&pf->switch_mutex); /* VEB list may be fragmented if VEB creation/destruction has * been happening. We can afford to do a quic...
0
[ "CWE-400", "CWE-401" ]
linux
27d461333459d282ffa4a2bdb6b215a59d493a8f
329,286,528,672,116,950,000,000,000,000,000,000,000
38
i40e: prevent memory leak in i40e_setup_macvlans In i40e_setup_macvlans if i40e_setup_channel fails the allocated memory for ch should be released. Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
vmxnet3_io_bar1_write(void *opaque, hwaddr addr, uint64_t val, unsigned size) { VMXNET3State *s = opaque; switch (addr) { /* Vmxnet3 Revision Report Selection */ case VMXNET3_REG_VRRS: VMW_CBPRN("Write BAR1 [VMXNET3_REG_VRRS] = %...
0
[ "CWE-20" ]
qemu
a7278b36fcab9af469563bd7b9dadebe2ae25e48
202,799,813,522,193,130,000,000,000,000,000,000,000
88
net/vmxnet3: Refine l2 header validation Validation of l2 header length assumed minimal packet size as eth_header + 2 * vlan_header regardless of the actual protocol. This caused crash for valid non-IP packets shorter than 22 bytes, as 'tx_pkt->packet_type' hasn't been assigned for such packets, and 'vmxnet3_on_tx_do...