func string | target int64 | cwe list | project string | commit_id string | hash float64 | size int64 | message string |
|---|---|---|---|---|---|---|---|
ExecutorStart(QueryDesc *queryDesc, int eflags)
{
if (ExecutorStart_hook)
(*ExecutorStart_hook) (queryDesc, eflags);
else
standard_ExecutorStart(queryDesc, eflags);
} | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 34,477,344,480,147,906,000,000,000,000,000,000,000 | 7 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
proto_register_dnp3(void)
{
/* Setup list of header fields */
static hf_register_info hf[] = {
{ &hf_dnp3_start,
{ "Start Bytes", "dnp3.start",
FT_UINT16, BASE_HEX, NULL, 0x0,
NULL, HFILL }
},
{ &hf_dnp3_len,
{ "Length", "dnp3.len",
FT_UINT8, BASE_DEC, NULL, 0x0,
... | 0 | [
"CWE-835"
] | wireshark | 618661b22e34a59b21117db723d8ff91e064d4ba | 125,148,304,566,891,260,000,000,000,000,000,000,000 | 1,086 | dnp: plug a memory leak.
If we're throwing away the data, *throw away the data* - free it, as
we're not using it as the backing data for a tvbuff. |
int create_pipe_files(struct file **res, int flags)
{
int err;
struct inode *inode = get_pipe_inode();
struct file *f;
struct path path;
static struct qstr name = { .name = "" };
if (!inode)
return -ENFILE;
err = -ENOMEM;
path.dentry = d_alloc_pseudo(pipe_mnt->mnt_sb, &name);
if (!path.dentry)
goto err_i... | 0 | [
"CWE-17"
] | linux | f0d1bec9d58d4c038d0ac958c9af82be6eb18045 | 109,359,592,476,458,390,000,000,000,000,000,000,000 | 49 | new helper: copy_page_from_iter()
parallel to copy_page_to_iter(). pipe_write() switched to it (and became
->write_iter()).
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> |
ews_store_get_public_folders_name (CamelEwsStore *ews_store)
{
gchar *use_name = NULL;
gchar *tmp_fid;
gint counter = 0;
tmp_fid = camel_ews_store_summary_get_folder_id_from_name (
ews_store->summary, EWS_PUBLIC_FOLDER_ROOT_DISPLAY_NAME);
while (tmp_fid) {
counter++;
g_free (tmp_fid);
g_free (use_name);
... | 0 | [
"CWE-295"
] | evolution-ews | 915226eca9454b8b3e5adb6f2fff9698451778de | 229,180,066,515,179,500,000,000,000,000,000,000,000 | 27 | I#27 - SSL Certificates are not validated
This depends on https://gitlab.gnome.org/GNOME/evolution-data-server/commit/6672b8236139bd6ef41ecb915f4c72e2a052dba5 too.
Closes https://gitlab.gnome.org/GNOME/evolution-ews/issues/27 |
static int mov_read_aclr(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int ret = 0;
int length = 0;
uint64_t original_size;
if (c->fc->nb_streams >= 1) {
AVCodecParameters *par = c->fc->streams[c->fc->nb_streams-1]->codecpar;
if (par->codec_id == AV_CODEC_ID_H264)
return 0;... | 0 | [
"CWE-703"
] | FFmpeg | c953baa084607dd1d84c3bfcce3cf6a87c3e6e05 | 159,373,805,237,846,380,000,000,000,000,000,000,000 | 42 | avformat/mov: Check count sums in build_open_gop_key_points()
Fixes: ffmpeg.md
Fixes: Out of array access
Fixes: CVE-2022-2566
Found-by: Andy Nguyen <theflow@google.com>
Found-by: 3pvd <3pvd@google.com>
Reviewed-by: Andy Nguyen <theflow@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> |
string Tensor::DebugString(int num_values) const {
return strings::StrCat("Tensor<type: ", DataTypeString(dtype()),
" shape: ", shape().DebugString(),
" values: ", SummarizeValue(num_values), ">");
} | 0 | [
"CWE-345"
] | tensorflow | abcced051cb1bd8fb05046ac3b6023a7ebcc4578 | 127,068,545,347,720,660,000,000,000,000,000,000,000 | 5 | Prevent crashes when loading tensor slices with unsupported types.
Also fix the `Tensor(const TensorShape&)` constructor swapping the LOG(FATAL)
messages for the unset and unsupported types.
PiperOrigin-RevId: 392695027
Change-Id: I4beda7db950db951d273e3259a7c8534ece49354 |
static void dump_boot(DOS_FS * fs, struct boot_sector *b, unsigned lss)
{
unsigned short sectors;
printf("Boot sector contents:\n");
if (!atari_format) {
char id[9];
strncpy(id, (const char *)b->system_id, 8);
id[8] = 0;
printf("System ID \"%s\"\n", id);
} else {
/* On Atari, a 24 bit serial numbe... | 0 | [
"CWE-119",
"CWE-703"
] | dosfstools | e8eff147e9da1185f9afd5b25948153a3b97cf52 | 282,122,772,566,335,570,000,000,000,000,000,000,000 | 52 | read_boot(): Handle excessive FAT size specifications
The variable used for storing the FAT size (in bytes) was an unsigned
int. Since the size in sectors read from the BPB was not sufficiently
checked, this could end up being zero after multiplying it with the
sector size while some offsets still stayed excessive. Ul... |
static BOOL update_read_fast_glyph_order(wStream* s, const ORDER_INFO* orderInfo,
FAST_GLYPH_ORDER* fastGlyph)
{
GLYPH_DATA_V2* glyph = &fastGlyph->glyphData;
ORDER_FIELD_BYTE(1, fastGlyph->cacheId);
ORDER_FIELD_2BYTE(2, fastGlyph->ulCharInc, fastGlyph->flAccel);
ORDER_FIELD... | 0 | [
"CWE-125"
] | FreeRDP | b8beb55913471952f92770c90c372139d78c16c0 | 318,979,550,372,397,930,000,000,000,000,000,000,000 | 74 | Fixed OOB read in update_read_cache_bitmap_v3_order
CVE-2020-11096 thanks @antonio-morales for finding this. |
MagickExport Image *RotateImage(const Image *image,const double degrees,
ExceptionInfo *exception)
{
Image
*distort_image,
*rotate_image;
double
angle;
PointInfo
shear;
size_t
rotations;
/*
Adjust rotation angle.
*/
assert(image != (Image *) NULL);
assert(image->signature =... | 0 | [] | ImageMagick | f8e8535bc821f24a30beee0030ff21ee3a2deedc | 172,282,403,448,755,800,000,000,000,000,000,000,000 | 45 | https://github.com/ImageMagick/ImageMagick/issues/3331 |
int Elf_(r_bin_elf_get_static)(ELFOBJ *bin) {
int i;
if (!bin->phdr) {
return false;
}
for (i = 0; i < bin->ehdr.e_phnum; i++) {
if (bin->phdr[i].p_type == PT_INTERP) {
return false;
}
}
return true;
} | 0 | [
"CWE-125"
] | radare2 | c6d0076c924891ad9948a62d89d0bcdaf965f0cd | 26,767,091,676,513,423,000,000,000,000,000,000,000 | 12 | Fix #8731 - Crash in ELF parser with negative 32bit number |
struct sk_buff *dccp_ctl_make_reset(struct socket *ctl, struct sk_buff *rcv_skb)
{
struct dccp_hdr *rxdh = dccp_hdr(rcv_skb), *dh;
struct dccp_skb_cb *dcb = DCCP_SKB_CB(rcv_skb);
const u32 dccp_hdr_reset_len = sizeof(struct dccp_hdr) +
sizeof(struct dccp_hdr_ext) +
sizeof(struct dccp_hdr_reset)... | 0 | [
"CWE-119"
] | linux-stable | f53dc67c5e7babafe239b93a11678b0e05bead51 | 324,322,250,366,509,560,000,000,000,000,000,000,000 | 48 | [DCCP]: Use AF-independent rebuild_header routine
This fixes a nasty bug: dccp_send_reset() is called by both DCCPv4 and DCCPv6, but uses
inet_sk_rebuild_header() in each case. This leads to unpredictable and weird behaviour:
under some conditions, DCCPv6 Resets were sent, in other not.
The fix is to use the AF-indep... |
void session_info_destroy(struct session_info *si)
{
} | 0 | [
"CWE-362"
] | spice-vd_agent | 5c50131797e985d0a5654c1fd7000ae945ed29a7 | 71,838,147,608,801,320,000,000,000,000,000,000,000 | 3 | Better check for sessions
Do not allow other users to hijack a session checking that
the process is launched by the owner of the session.
Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Acked-by: Uri Lublin <uril@redhat.com> |
void ConnectionHandlerImpl::ActiveTcpSocket::setDynamicMetadata(const std::string& name,
const ProtobufWkt::Struct& value) {
(*metadata_.mutable_filter_metadata())[name].MergeFrom(value);
} | 0 | [
"CWE-400"
] | envoy | dfddb529e914d794ac552e906b13d71233609bf7 | 67,990,225,843,775,600,000,000,000,000,000,000,000 | 4 | listener: Add configurable accepted connection limits (#153)
Add support for per-listener limits on accepted connections.
Signed-off-by: Tony Allen <tony@allen.gg> |
void lxc_delete_network(struct lxc_handler *handler)
{
struct lxc_list *network = &handler->conf->network;
struct lxc_list *iterator;
struct lxc_netdev *netdev;
lxc_list_for_each(iterator, network) {
netdev = iterator->elem;
if (netdev->ifindex != 0 && netdev->type == LXC_NET_PHYS) {
if (lxc_netdev_rename_... | 0 | [
"CWE-59",
"CWE-61"
] | lxc | 592fd47a6245508b79fe6ac819fe6d3b2c1289be | 215,685,462,120,057,070,000,000,000,000,000,000,000 | 29 | CVE-2015-1335: Protect container mounts against symlinks
When a container starts up, lxc sets up the container's inital fstree
by doing a bunch of mounting, guided by the container configuration
file. The container config is owned by the admin or user on the host,
so we do not try to guard against bad entries. Howev... |
static int whereLoopInsert(WhereLoopBuilder *pBuilder, WhereLoop *pTemplate){
WhereLoop **ppPrev, *p;
WhereInfo *pWInfo = pBuilder->pWInfo;
sqlite3 *db = pWInfo->pParse->db;
int rc;
/* Stop the search once we hit the query planner search limit */
if( pBuilder->iPlanLimit==0 ){
WHERETRACE(0xffffffff,("=... | 0 | [
"CWE-129"
] | sqlite | effc07ec9c6e08d3bd17665f8800054770f8c643 | 147,230,256,234,676,850,000,000,000,000,000,000,000 | 107 | Fix the whereKeyStats() routine (part of STAT4 processing only) so that it
is able to cope with row-value comparisons against the primary key index
of a WITHOUT ROWID table.
[forum:/forumpost/3607259d3c|Forum post 3607259d3c].
FossilOrigin-Name: 2a6f761864a462de5c2d5bc666b82fb0b7e124a03443cd1482620dde344b34bb |
writetup_heap(Tuplesortstate *state, int tapenum, SortTuple *stup)
{
MinimalTuple tuple = (MinimalTuple) stup->tuple;
/* the part of the MinimalTuple we'll write: */
char *tupbody = (char *) tuple + MINIMAL_TUPLE_DATA_OFFSET;
unsigned int tupbodylen = tuple->t_len - MINIMAL_TUPLE_DATA_OFFSET;
/* total on-disk... | 0 | [
"CWE-209"
] | postgres | 804b6b6db4dcfc590a468e7be390738f9f7755fb | 328,780,692,923,271,930,000,000,000,000,000,000,000 | 22 | Fix column-privilege leak in error-message paths
While building error messages to return to the user,
BuildIndexValueDescription, ExecBuildSlotValueDescription and
ri_ReportViolation would happily include the entire key or entire row in
the result returned to the user, even if the user didn't have access to
view all o... |
ConnectionDone(struct Curl_easy *data, struct connectdata *conn)
{
/* data->multi->maxconnects can be negative, deal with it. */
size_t maxconnects =
(data->multi->maxconnects < 0) ? data->multi->num_easy * 4:
data->multi->maxconnects;
struct connectdata *conn_candidate = NULL;
/* Mark the current conn... | 0 | [
"CWE-416"
] | curl | 75dc096e01ef1e21b6c57690d99371dedb2c0b80 | 328,123,643,885,234,570,000,000,000,000,000,000,000 | 28 | curl_multi_cleanup: clear connection pointer for easy handles
CVE-2016-5421
Bug: https://curl.haxx.se/docs/adv_20160803C.html
Reported-by: Marcelo Echeverria and Fernando Muñoz |
static int cma_resolve_ib_dev(struct rdma_id_private *id_priv)
{
struct cma_device *cma_dev, *cur_dev;
struct sockaddr_ib *addr;
union ib_gid gid, sgid, *dgid;
unsigned int p;
u16 pkey, index;
enum ib_port_state port_state;
int i;
cma_dev = NULL;
addr = (struct sockaddr_ib *) cma_dst_addr(id_priv);
dgid = (u... | 0 | [
"CWE-416"
] | linux | bc0bdc5afaa740d782fbf936aaeebd65e5c2921d | 198,153,387,602,826,200,000,000,000,000,000,000,000 | 59 | RDMA/cma: Do not change route.addr.src_addr.ss_family
If the state is not idle then rdma_bind_addr() will immediately fail and
no change to global state should happen.
For instance if the state is already RDMA_CM_LISTEN then this will corrupt
the src_addr and would cause the test in cma_cancel_operation():
if (cma... |
int ff_h264_alloc_tables(H264Context *h)
{
const int big_mb_num = h->mb_stride * (h->mb_height + 1);
const int row_mb_num = 2*h->mb_stride*FFMAX(h->avctx->thread_count, 1);
int x, y, i;
FF_ALLOCZ_OR_GOTO(h->avctx, h->intra4x4_pred_mode,
row_mb_num * 8 * sizeof(uint8_t), fail)
... | 0 | [
"CWE-703"
] | FFmpeg | 29ffeef5e73b8f41ff3a3f2242d356759c66f91f | 256,895,299,831,942,430,000,000,000,000,000,000,000 | 60 | avcodec/h264: do not trust last_pic_droppable when marking pictures as done
This simplifies the code and fixes a deadlock
Fixes Ticket2927
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> |
static const char* string() { static const char *const s = "unsigned int"; return s; } | 0 | [
"CWE-125"
] | CImg | 10af1e8c1ad2a58a0a3342a856bae63e8f257abb | 283,241,990,784,283,500,000,000,000,000,000,000,000 | 1 | Fix other issues in 'CImg<T>::load_bmp()'. |
static bool needs_glob(ItemType t) {
return IN_SET(t,
WRITE_FILE,
IGNORE_PATH,
IGNORE_DIRECTORY_PATH,
REMOVE_PATH,
RECURSIVE_REMOVE_PATH,
EMPTY_DIRECTORY,
ADJ... | 0 | [
"CWE-59"
] | systemd | 5579f85663d10269e7ac7464be6548c99cea4ada | 36,442,698,924,714,490,000,000,000,000,000,000,000 | 18 | tmpfiles: refuse to chown()/chmod() files which are hardlinked, unless protected_hardlinks sysctl is on
Let's add some extra safety.
Fixes: #7736 |
Http::Stream::getNextRangeOffset() const
{
debugs (33, 5, "range: " << http->request->range <<
"; http offset " << http->out.offset <<
"; reply " << reply);
// XXX: This method is called from many places, including pullData() which
// may be called before prepareReply() [on some Squ... | 0 | [
"CWE-20"
] | squid | 1e05a85bd28c22c9ca5d3ac9f5e86d6269ec0a8c | 117,850,714,022,679,860,000,000,000,000,000,000,000 | 48 | Handle more partial responses (#791) |
STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void)
{
load_builtin_compressions();
return(ssl_comp_methods);
} | 0 | [] | openssl | edc032b5e3f3ebb1006a9c89e0ae00504f47966f | 319,669,208,931,290,650,000,000,000,000,000,000,000 | 5 | Add SRP support. |
flow_to_string(const struct flow *flow)
{
struct ds ds = DS_EMPTY_INITIALIZER;
flow_format(&ds, flow);
return ds_cstr(&ds);
} | 0 | [
"CWE-400"
] | ovs | ad0d22f6435b43ecfc30c0e877d490d36721f200 | 23,013,162,230,993,820,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... |
//! Convert pixel values from RGB to HSV color spaces.
CImg<T>& RGBtoHSV() {
if (_spectrum!=3)
throw CImgInstanceException(_cimg_instance
"RGBtoHSV(): Instance is not a RGB image.",
cimg_instance);
T *p1 = data(0,0,0,0)... | 0 | [
"CWE-119",
"CWE-787"
] | CImg | ac8003393569aba51048c9d67e1491559877b1d1 | 123,870,229,321,020,410,000,000,000,000,000,000,000 | 24 | . |
static void perf_cgroup_switch(struct task_struct *task, int mode)
{
struct perf_cpu_context *cpuctx;
struct pmu *pmu;
unsigned long flags;
/*
* disable interrupts to avoid geting nr_cgroup
* changes via __perf_event_disable(). Also
* avoids preemption.
*/
local_irq_save(flags);
/*
* we reschedule onl... | 0 | [
"CWE-416",
"CWE-362"
] | linux | 12ca6ad2e3a896256f086497a7c7406a547ee373 | 165,514,811,845,556,920,000,000,000,000,000,000,000 | 62 | perf: Fix race in swevent hash
There's a race on CPU unplug where we free the swevent hash array
while it can still have events on. This will result in a
use-after-free which is BAD.
Simply do not free the hash array on unplug. This leaves the thing
around and no use-after-free takes place.
When the last swevent die... |
xmlXPtrGetNthChild(xmlNodePtr cur, int no) {
int i;
if (cur == NULL)
return(cur);
cur = cur->children;
for (i = 0;i <= no;cur = cur->next) {
if (cur == NULL)
return(cur);
if ((cur->type == XML_ELEMENT_NODE) ||
(cur->type == XML_DOCUMENT_NODE) ||
(cur->type == XML_HTML_DOCUMENT_NODE))... | 0 | [
"CWE-415"
] | libxml2 | f5048b3e71fc30ad096970b8df6e7af073bae4cb | 60,273,725,790,991,780,000,000,000,000,000,000,000 | 18 | Hardening of XPath evaluation
Add a mechanism of frame for XPath evaluation when entering a function
or a scoped evaluation, also fix a potential problem in predicate
evaluation. |
static void print_page_info(struct page *page)
{
printk(KERN_ERR "INFO: Slab 0x%p objects=%u used=%u fp=0x%p flags=0x%04lx\n",
page, page->objects, page->inuse, page->freelist, page->flags);
} | 0 | [
"CWE-189"
] | linux | f8bd2258e2d520dff28c855658bd24bdafb5102d | 134,304,246,879,656,980,000,000,000,000,000,000,000 | 6 | remove div_long_long_rem
x86 is the only arch right now, which provides an optimized for
div_long_long_rem and it has the downside that one has to be very careful that
the divide doesn't overflow.
The API is a little akward, as the arguments for the unsigned divide are
signed. The signed version also doesn't handle ... |
static void diff_index_show_file(struct rev_info *revs,
const char *prefix,
struct cache_entry *ce,
const unsigned char *sha1, unsigned int mode)
{
diff_addremove(&revs->diffopt, prefix[0], mode,
sha1, ce->name);
} | 0 | [
"CWE-119"
] | git | fd55a19eb1d49ae54008d932a65f79cd6fda45c9 | 53,878,270,658,572,530,000,000,000,000,000,000,000 | 8 | Fix buffer overflow in git diff
If PATH_MAX on your system is smaller than a path stored, it may cause
buffer overflow and stack corruption in diff_addremove() and diff_change()
functions when running git-diff
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com> |
static inline uint32_t ok_inflater_peek_bits(ok_inflater *inflater, unsigned int num_bits) {
return inflater->input_buffer & ((1 << num_bits) - 1);
} | 0 | [
"CWE-787"
] | ok-file-formats | e49cdfb84fb5eca2a6261f3c51a3c793fab9f62e | 149,173,901,965,604,700,000,000,000,000,000,000,000 | 3 | ok_png: Disallow multiple IHDR chunks (#15) |
gegl_op_class_init (GeglOpClass *klass)
{
GeglOperationClass *operation_class;
GeglOperationSourceClass *source_class;
operation_class = GEGL_OPERATION_CLASS (klass);
source_class = GEGL_OPERATION_SOURCE_CLASS (klass);
source_class->process = process;
operation_class->get_bounding_box = get_bound... | 0 | [
"CWE-119"
] | gegl | c83b05d565a1e3392c9606a4ecaa560eb9a4ee29 | 253,660,431,890,113,800,000,000,000,000,000,000,000 | 34 | ppm-load: limit max permitted buffer allocation to 2GB
Fixing bug #795248 |
void vnc_jobs_join(VncState *vs)
{
vnc_lock_queue(queue);
while (vnc_has_job_locked(vs)) {
qemu_cond_wait(&queue->cond, &queue->mutex);
}
vnc_unlock_queue(queue);
vnc_jobs_consume_buffer(vs);
} | 0 | [
"CWE-125"
] | qemu | 9f64916da20eea67121d544698676295bbb105a7 | 112,217,655,848,400,260,000,000,000,000,000,000,000 | 9 | pixman/vnc: use pixman images in vnc.
The vnc code uses *three* DisplaySurfaces:
First is the surface of the actual QemuConsole, usually the guest
screen, but could also be a text console (monitor/serial reachable via
Ctrl-Alt-<nr> keys). This is left as-is.
Second is the current server's view of the screen content... |
void vncws_handshake_read(void *opaque)
{
VncState *vs = opaque;
uint8_t *handshake_end;
long ret;
/* Typical HTTP headers from novnc are 512 bytes, so limiting
* total header size to 4096 is easily enough. */
size_t want = 4096 - vs->ws_input.offset;
buffer_reserve(&vs->ws_input, want);
... | 0 | [] | qemu | 2cdb5e142fb93e875fa53c52864ef5eb8d5d8b41 | 223,277,850,232,457,620,000,000,000,000,000,000,000 | 31 | CVE-2015-1779: limit size of HTTP headers from websockets clients
The VNC server websockets decoder will read and buffer data from
websockets clients until it sees the end of the HTTP headers,
as indicated by \r\n\r\n. In theory this allows a malicious to
trick QEMU into consuming an arbitrary amount of RAM. In practi... |
static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define SkipLinesOp 0x01
#define SetColorOp 0x02
#define SkipPixelsOp 0x03
#define ByteDataOp 0x05
#define RunDataOp 0x06
#define EOFOp 0x07
char
magick[12];
Image
*image;
int
opcode,
operand,
status;
... | 1 | [
"CWE-20"
] | ImageMagick | b218117cad34d39b9ffb587b45c71c5a49b12bde | 324,878,351,939,984,300,000,000,000,000,000,000,000 | 540 | https://github.com/ImageMagick/ImageMagick/issues/415 |
int mlx5_ib_destroy_rwq_ind_table(struct ib_rwq_ind_table *ib_rwq_ind_tbl)
{
struct mlx5_ib_rwq_ind_table *rwq_ind_tbl = to_mrwq_ind_table(ib_rwq_ind_tbl);
struct mlx5_ib_dev *dev = to_mdev(ib_rwq_ind_tbl->device);
mlx5_core_destroy_rqt(dev->mdev, rwq_ind_tbl->rqtn);
kfree(rwq_ind_tbl);
return 0;
} | 0 | [
"CWE-119",
"CWE-787"
] | linux | 0625b4ba1a5d4703c7fb01c497bd6c156908af00 | 303,794,867,819,817,050,000,000,000,000,000,000,000 | 10 | IB/mlx5: Fix leaking stack memory to userspace
mlx5_ib_create_qp_resp was never initialized and only the first 4 bytes
were written.
Fixes: 41d902cb7c32 ("RDMA/mlx5: Fix definition of mlx5_ib_create_qp_resp")
Cc: <stable@vger.kernel.org>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <... |
PrintFlush()
{
display = curr->w_pdisplay;
if (display && printcmd)
{
char *bp = curr->w_string;
int len = curr->w_stringp - curr->w_string;
int r;
while (len && display->d_printfd >= 0)
{
r = write(display->d_printfd, bp, len);
if (r <= 0)
{
WMsg(curr, errno, "printin... | 0 | [] | screen | c5db181b6e017cfccb8d7842ce140e59294d9f62 | 194,809,737,357,270,400,000,000,000,000,000,000,000 | 31 | ansi: add support for xterm OSC 11
It allows for getting and setting the background color. Notably, Vim uses
OSC 11 to learn whether it's running on a light or dark colored terminal
and choose a color scheme accordingly.
Tested with gnome-terminal and xterm. When called with "?" argument the
current background color ... |
compat_sys_io_getevents(aio_context_t ctx_id,
unsigned long min_nr,
unsigned long nr,
struct io_event __user *events,
struct compat_timespec __user *timeout)
{
long ret;
struct timespec t;
struct timespec __user *ut = NULL;
ret = -EFAULT;
if (unlikely(!access_ok(VERIFY_WRITE, events,
nr *... | 0 | [] | linux-2.6 | 822191a2fa1584a29c3224ab328507adcaeac1ab | 197,098,794,861,831,750,000,000,000,000,000,000,000 | 26 | [PATCH] skip data conversion in compat_sys_mount when data_page is NULL
OpenVZ Linux kernel team has found a problem with mounting in compat mode.
Simple command "mount -t smbfs ..." on Fedora Core 5 distro in 32-bit mode
leads to oops:
Unable to handle kernel NULL pointer dereference at 0000000000000000 RIP: comp... |
static int nf_tables_dump_obj_start(struct netlink_callback *cb)
{
const struct nlattr * const *nla = cb->data;
struct nft_obj_filter *filter = NULL;
if (nla[NFTA_OBJ_TABLE] || nla[NFTA_OBJ_TYPE]) {
filter = kzalloc(sizeof(*filter), GFP_ATOMIC);
if (!filter)
return -ENOMEM;
if (nla[NFTA_OBJ_TABLE]) {
f... | 0 | [
"CWE-665"
] | linux | ad9f151e560b016b6ad3280b48e42fa11e1a5440 | 165,509,246,820,169,770,000,000,000,000,000,000,000 | 25 | netfilter: nf_tables: initialize set before expression setup
nft_set_elem_expr_alloc() needs an initialized set if expression sets on
the NFT_EXPR_GC flag. Move set fields initialization before expression
setup.
[4512935.019450] ==================================================================
[4512935.019456] BUG: ... |
static bool blacklisted(const char *module_name)
{
const char *p;
size_t len;
if (!module_blacklist)
return false;
for (p = module_blacklist; *p; p += len) {
len = strcspn(p, ",");
if (strlen(module_name) == len && !memcmp(module_name, p, len))
return true;
if (p[len] == ',')
len++;
}
return false... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 181,727,387,991,723,150,000,000,000,000,000,000,000 | 17 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static int do_check(struct bpf_verifier_env *env)
{
struct bpf_verifier_state *state;
struct bpf_insn *insns = env->prog->insnsi;
struct bpf_reg_state *regs;
int insn_cnt = env->prog->len;
int insn_idx, prev_insn_idx = 0;
int insn_processed = 0;
bool do_print_state = false;
state = kzalloc(sizeof(struct bpf_ve... | 1 | [
"CWE-20"
] | linux | c131187db2d3fa2f8bf32fdf4e9a4ef805168467 | 238,615,175,707,936,700,000,000,000,000,000,000,000 | 288 | bpf: fix branch pruning logic
when the verifier detects that register contains a runtime constant
and it's compared with another constant it will prune exploration
of the branch that is guaranteed not to be taken at runtime.
This is all correct, but malicious program may be constructed
in such a way that it always has... |
static int setcos_generate_store_key(sc_card_t *card,
struct sc_cardctl_setcos_gen_store_key_info *data)
{
struct sc_apdu apdu;
u8 sbuf[SC_MAX_APDU_BUFFER_SIZE];
int r, len;
SC_FUNC_CALLED(card->ctx, SC_LOG_DEBUG_VERBOSE);
/* Setup key-generation parameters */
len = 0;
if (data->op_type == OP_TYPE_GENERATE)
... | 0 | [
"CWE-125"
] | OpenSC | c3f23b836e5a1766c36617fe1da30d22f7b63de2 | 301,409,250,894,627,000,000,000,000,000,000,000,000 | 49 | fixed UNKNOWN READ
Reported by OSS-Fuzz
https://oss-fuzz.com/testcase-detail/5681169970757632 |
TEST_F(AuthorizationManagerTest, testAcquireV2UserWithUnrecognizedActions) {
OperationContextNoop opCtx;
ASSERT_OK(
externalState->insertPrivilegeDocument(&opCtx,
BSON("_id"
<< "admin.myUser"
... | 0 | [
"CWE-863"
] | mongo | a93cfd354467981c9cf944a4ada748d0226fdfb0 | 222,379,545,295,017,430,000,000,000,000,000,000,000 | 51 | SERVER-45472 Ensure RoleGraph can serialize authentication restrictions to BSON
(cherry picked from commit 521e56b407ac72bc69a97a24d1253f51a5b6e81b)
(cherry picked from commit a10d0a22d5d009d27664967181042933ec1bef36)
(cherry picked from commit fb87cc88ecb5d300f14cda7bc238d7d5132118f5) |
inline int ComputeOutSize(TfLitePadding padding, int image_size,
int filter_size, int stride, int dilation_rate = 1) {
int effective_filter_size = (filter_size - 1) * dilation_rate + 1;
// TODO(b/186448822): This uses 0 since the function has no other way to
// report error case
if (s... | 0 | [
"CWE-369"
] | tensorflow | 49847ae69a4e1a97ae7f2db5e217c77721e37948 | 109,528,741,404,352,480,000,000,000,000,000,000,000 | 17 | Fix division by zero in TFLite padding.
PiperOrigin-RevId: 370777494
Change-Id: Ic1331e4a1603b9e4c8aa183012a6c8237410aa0f |
int __fsnotify_parent(const struct path *path, struct dentry *dentry, __u32 mask)
{
struct dentry *parent;
struct inode *p_inode;
int ret = 0;
if (!dentry)
dentry = path->dentry;
if (!(dentry->d_flags & DCACHE_FSNOTIFY_PARENT_WATCHED))
return 0;
parent = dget_parent(dentry);
p_inode = parent->d_inode;
i... | 1 | [
"CWE-362",
"CWE-399"
] | linux | 49d31c2f389acfe83417083e1208422b4091cd9e | 160,684,901,138,764,380,000,000,000,000,000,000,000 | 34 | dentry name snapshots
take_dentry_name_snapshot() takes a safe snapshot of dentry name;
if the name is a short one, it gets copied into caller-supplied
structure, otherwise an extra reference to external name is grabbed
(those are never modified). In either case the pointer to stable
string is stored into the same st... |
imapx_reconnect (CamelIMAPXServer *is,
GCancellable *cancellable,
GError **error)
{
CamelIMAPXCommand *ic;
CamelService *service;
CamelSession *session;
CamelIMAPXStore *store;
CamelSettings *settings;
gchar *mechanism;
gboolean use_qresync;
gboolean use_idle;
gboolean success... | 0 | [
"CWE-476"
] | evolution-data-server | 2cc39592b532cf0dc994fd3694b8e6bf924c9ab5 | 97,390,694,645,337,000,000,000,000,000,000,000,000 | 191 | I#189 - Crash on malformed server response with minimal capabilities
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/189 |
void reds_on_main_channel_migrate(RedsState *reds, MainChannelClient *mcc)
{
RedCharDeviceVDIPort *agent_dev = reds->agent_dev.get();
uint32_t read_data_len;
spice_assert(reds->clients.size() == 1);
if (agent_dev->priv->read_state != VDI_PORT_READ_STATE_READ_DATA) {
return;
}
spice_ass... | 0 | [] | spice | ca5bbc5692e052159bce1a75f55dc60b36078749 | 227,745,802,009,788,950,000,000,000,000,000,000,000 | 42 | With OpenSSL 1.1: Disable client-initiated renegotiation.
Fixes issue #49
Fixes BZ#1904459
Signed-off-by: Julien Ropé <jrope@redhat.com>
Reported-by: BlackKD
Acked-by: Frediano Ziglio <fziglio@redhat.com> |
void OSD::ms_fast_preprocess(Message *m)
{
if (m->get_connection()->get_peer_type() == CEPH_ENTITY_TYPE_OSD) {
if (m->get_type() == CEPH_MSG_OSD_MAP) {
MOSDMap *mm = static_cast<MOSDMap*>(m);
Session *s = static_cast<Session*>(m->get_connection()->get_priv());
if (s) {
s->received_map_lock.lock... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 93,126,491,498,278,020,000,000,000,000,000,000,000 | 15 | 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 void scripted_data_feed_init2(scripted_data_feed *df,
nghttp2_bufs *bufs) {
nghttp2_buf_chain *ci;
nghttp2_buf *buf;
uint8_t *ptr;
size_t len;
memset(df, 0, sizeof(scripted_data_feed));
ptr = df->data;
len = 0;
for (ci = bufs->head; ci; ci = ci->next) {
... | 0 | [] | nghttp2 | 0a6ce87c22c69438ecbffe52a2859c3a32f1620f | 208,756,443,564,121,150,000,000,000,000,000,000,000 | 21 | Add nghttp2_option_set_max_outbound_ack |
void CLua::set_error(int err, lua_State *ls)
{
if (!err)
{
error.clear();
return;
}
if (!ls && !(ls = _state))
{
error = "<LUA not initialised>";
return;
}
const char *serr = lua_tostring(ls, -1);
lua_pop(ls, 1);
error = serr? serr : "<Unknown error>";... | 0 | [
"CWE-434"
] | crawl | fc522ff6eb1bbb85e3de60c60a45762571e48c28 | 36,431,416,906,901,146,000,000,000,000,000,000,000 | 16 | Disable lua load(), loadstring() bytcode loading |
static int tracing_release_pipe(struct inode *inode, struct file *file)
{
struct trace_iterator *iter = file->private_data;
struct trace_array *tr = inode->i_private;
mutex_lock(&trace_types_lock);
tr->current_trace->ref--;
if (iter->trace->pipe_close)
iter->trace->pipe_close(iter);
mutex_unlock(&trace_type... | 0 | [
"CWE-415"
] | linux | 4397f04575c44e1440ec2e49b6302785c95fd2f8 | 101,938,979,579,101,500,000,000,000,000,000,000,000 | 22 | tracing: Fix possible double free on failure of allocating trace buffer
Jing Xia and Chunyan Zhang reported that on failing to allocate part of the
tracing buffer, memory is freed, but the pointers that point to them are not
initialized back to NULL, and later paths may try to free the freed memory
again. Jing and Chu... |
xbstream_close(ds_file_t *file)
{
ds_stream_file_t *stream_file;
int rc = 0;
stream_file = (ds_stream_file_t *)file->ptr;
rc = xb_stream_write_close(stream_file->xbstream_file);
my_free(file);
return rc;
} | 0 | [
"CWE-703",
"CWE-667"
] | server | b1351c15946349f9daa7e5297fb2ac6f3139e4a8 | 297,218,048,605,422,770,000,000,000,000,000,000,000 | 13 | MDEV-26574 An improper locking bug due to unreleased lock in the ds_xbstream.cc
release lock in all as cases n xbstream_open, also fix the case where malloc would return NULL. |
static int selinux_file_fcntl(struct file *file, unsigned int cmd,
unsigned long arg)
{
const struct cred *cred = current_cred();
int err = 0;
switch (cmd) {
case F_SETFL:
if ((file->f_flags & O_APPEND) && !(arg & O_APPEND)) {
err = file_has_perm(cred, file, FILE__WRITE);
break;
}
fallthrough;... | 0 | [
"CWE-416"
] | linux | a3727a8bac0a9e77c70820655fd8715523ba3db7 | 23,247,005,577,342,397,000,000,000,000,000,000,000 | 39 | selinux,smack: fix subjective/objective credential use mixups
Jann Horn reported a problem with commit eb1231f73c4d ("selinux:
clarify task subjective and objective credentials") where some LSM
hooks were attempting to access the subjective credentials of a task
other than the current task. Generally speaking, it is ... |
void OSD::reset_heartbeat_peers()
{
assert(osd_lock.is_locked());
dout(10) << "reset_heartbeat_peers" << dendl;
Mutex::Locker l(heartbeat_lock);
while (!heartbeat_peers.empty()) {
HeartbeatInfo& hi = heartbeat_peers.begin()->second;
hi.con_back->mark_down();
if (hi.con_front) {
hi.con_front->m... | 0 | [
"CWE-287",
"CWE-284"
] | ceph | 5ead97120e07054d80623dada90a5cc764c28468 | 175,871,689,522,385,700,000,000,000,000,000,000,000 | 15 | 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 ... |
_gnutls_x509_encode_and_copy_PKI_params(ASN1_TYPE dst,
const char *dst_name,
gnutls_pk_algorithm_t
pk_algorithm,
gnutls_pk_params_st * params)
{
const char *pk;
gnutls_datum_t der = { NULL, 0 };
int result;
char name[128];
pk = _gnutls_x509_pk_to_oid(pk_algorithm);
if (pk == NULL) {
gnutls_... | 0 | [] | gnutls | 272854367efc130fbd4f1a51840d80c630214e12 | 297,140,921,653,526,460,000,000,000,000,000,000,000 | 66 | Reset the output value on error in _gnutls_x509_dn_to_string()
Reported by Kurt Roeckx. |
HeaderMap& headers() override {
if (absl::holds_alternative<RequestHeaderMapPtr>(headers_or_trailers_)) {
return *absl::get<RequestHeaderMapPtr>(headers_or_trailers_);
} else {
return *absl::get<RequestTrailerMapPtr>(headers_or_trailers_);
}
} | 0 | [
"CWE-400"
] | envoy | 0e49a495826ea9e29134c1bd54fdeb31a034f40c | 68,268,143,575,741,880,000,000,000,000,000,000,000 | 7 | http/2: add stats and stream flush timeout (#139)
This commit adds a new stream flush timeout to guard against a
remote server that does not open window once an entire stream has
been buffered for flushing. Additional stats have also been added
to better understand the codecs view of active streams as well as
amount o... |
bool CIRCSock::OnInviteMessage(CMessage& Message) {
bool bResult = false;
IRCSOCKMODULECALL(OnInvite(Message.GetNick(), Message.GetParam(1)),
&bResult);
return bResult;
} | 0 | [
"CWE-20",
"CWE-284"
] | znc | d22fef8620cdd87490754f607e7153979731c69d | 276,737,576,888,253,430,000,000,000,000,000,000,000 | 6 | Better cleanup lines coming from network.
Thanks for Jeriko One <jeriko.one@gmx.us> for finding and reporting this. |
static int io_splice(struct io_kiocb *req, unsigned int issue_flags)
{
struct io_splice *sp = &req->splice;
struct file *in = sp->file_in;
struct file *out = sp->file_out;
unsigned int flags = sp->flags & ~SPLICE_F_FD_IN_FIXED;
loff_t *poff_in, *poff_out;
long ret = 0;
if (issue_flags & IO_URING_F_NONBLOCK)
r... | 0 | [
"CWE-787"
] | linux | d1f82808877bb10d3deee7cf3374a4eb3fb582db | 281,013,886,753,331,660,000,000,000,000,000,000,000 | 27 | io_uring: truncate lengths larger than MAX_RW_COUNT on provide buffers
Read and write operations are capped to MAX_RW_COUNT. Some read ops rely on
that limit, and that is not guaranteed by the IORING_OP_PROVIDE_BUFFERS.
Truncate those lengths when doing io_add_buffers, so buffer addresses still
use the uncapped lengt... |
static void __munlock_isolated_page(struct page *page)
{
int ret = SWAP_AGAIN;
/*
* Optimization: if the page was mapped just once, that's our mapping
* and we don't need to check all the other vmas.
*/
if (page_mapcount(page) > 1)
ret = try_to_munlock(page);
/* Did try_to_unlock() succeed or punt? */
if... | 0 | [
"CWE-400",
"CWE-703",
"CWE-264"
] | linux | 57e68e9cd65b4b8eb4045a1e0d0746458502554c | 307,647,022,722,018,440,000,000,000,000,000,000,000 | 17 | mm: try_to_unmap_cluster() should lock_page() before mlocking
A BUG_ON(!PageLocked) was triggered in mlock_vma_page() by Sasha Levin
fuzzing with trinity. The call site try_to_unmap_cluster() does not lock
the pages other than its check_page parameter (which is already locked).
The BUG_ON in mlock_vma_page() is not ... |
gid_t get_group_id(const char *groupname) {
gid_t gid = 0;
struct group *g = getgrnam(groupname);
if (g)
gid = g->gr_gid;
return gid;
} | 0 | [
"CWE-269",
"CWE-94"
] | firejail | 27cde3d7d1e4e16d4190932347c7151dc2a84c50 | 211,257,399,230,706,830,000,000,000,000,000,000,000 | 8 | fixing CVE-2022-31214 |
JsVar *jslGetTokenValueAsVar() {
if (lex->tokenValue) {
return jsvLockAgain(lex->tokenValue);
} else {
assert(lex->tokenl < JSLEX_MAX_TOKEN_LENGTH);
lex->token[lex->tokenl] = 0; // add final null
return jsvNewFromString(lex->token);
}
} | 0 | [
"CWE-787"
] | Espruino | bed844f109b6c222816740555068de2e101e8018 | 235,820,995,286,543,000,000,000,000,000,000,000,000 | 9 | remove strncpy usage as it's effectively useless, replace with an assertion since fn is only used internally (fix #1426) |
void Http2Stream::RefreshState(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Http2Stream* stream;
ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder());
DEBUG_HTTP2STREAM(stream, "refreshing state");
AliasedBuffer<double, v8::Float64Array>& buffer =
env->http2_... | 0 | [] | node | ce22d6f9178507c7a41b04ac4097b9ea902049e3 | 34,648,832,331,103,425,000,000,000,000,000,000,000 | 35 | http2: add altsvc support
Add support for sending and receiving ALTSVC frames.
PR-URL: https://github.com/nodejs/node/pull/17917
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com> |
static void virtio_net_tx_timer(void *opaque)
{
VirtIONetQueue *q = opaque;
VirtIONet *n = q->n;
VirtIODevice *vdev = VIRTIO_DEVICE(n);
/* This happens when device was stopped but BH wasn't. */
if (!vdev->vm_running) {
/* Make sure tx waiting is set, so we'll run when restarted. */
a... | 0 | [
"CWE-703"
] | qemu | abe300d9d894f7138e1af7c8e9c88c04bfe98b37 | 228,076,297,524,758,600,000,000,000,000,000,000,000 | 22 | virtio-net: fix map leaking on error during receive
Commit bedd7e93d0196 ("virtio-net: fix use after unmap/free for sg")
tries to fix the use after free of the sg by caching the virtqueue
elements in an array and unmap them at once after receiving the
packets, But it forgot to unmap the cached elements on error which
... |
goa_utils_store_credentials_for_object_sync (GoaProvider *provider,
GoaObject *object,
GVariant *credentials,
GCancellable *cancellable,
... | 0 | [
"CWE-310"
] | gnome-online-accounts | edde7c63326242a60a075341d3fea0be0bc4d80e | 65,376,958,570,485,160,000,000,000,000,000,000,000 | 17 | Guard against invalid SSL certificates
None of the branded providers (eg., Google, Facebook and Windows Live)
should ever have an invalid certificate. So set "ssl-strict" on the
SoupSession object being used by GoaWebView.
Providers like ownCloud and Exchange might have to deal with
certificates that are not up to th... |
ftp_site(ftpbuf_t *ftp, const char *cmd)
{
if (ftp == NULL) {
return 0;
}
if (!ftp_putcmd(ftp, "SITE", cmd)) {
return 0;
}
if (!ftp_getresp(ftp) || ftp->resp < 200 || ftp->resp >= 300) {
return 0;
}
return 1;
} | 0 | [
"CWE-189"
] | php-src | ac2832935435556dc593784cd0087b5e576bbe4d | 125,438,801,736,347,050,000,000,000,000,000,000,000 | 14 | Fix bug #69545 - avoid overflow when reading list |
static void tipc_sock_destruct(struct sock *sk)
{
__skb_queue_purge(&sk->sk_receive_queue);
} | 0 | [
"CWE-703"
] | linux | 45e093ae2830cd1264677d47ff9a95a71f5d9f9c | 322,231,349,182,621,400,000,000,000,000,000,000,000 | 4 | tipc: check nl sock before parsing nested attributes
Make sure the socket for which the user is listing publication exists
before parsing the socket netlink attributes.
Prior to this patch a call without any socket caused a NULL pointer
dereference in tipc_nl_publ_dump().
Tested-and-reported-by: Baozeng Ding <splovi... |
bool Box_ftyp::has_compatible_brand(uint32_t brand) const
{
for (uint32_t b : m_compatible_brands) {
if (b==brand) {
return true;
}
}
return false;
} | 0 | [
"CWE-703"
] | libheif | 2710c930918609caaf0a664e9c7bc3dce05d5b58 | 103,493,206,995,036,870,000,000,000,000,000,000,000 | 10 | force fraction to a limited resolution to finally solve those pesky numerical edge cases |
napi_status napi_remove_wrap(napi_env env, napi_value obj, void** result) {
return v8impl::Unwrap(env, obj, result, v8impl::RemoveWrap);
} | 0 | [
"CWE-191"
] | node | 656260b4b65fec3b10f6da3fdc9f11fb941aafb5 | 129,178,982,138,014,550,000,000,000,000,000,000,000 | 3 | napi: fix memory corruption vulnerability
Fixes: https://hackerone.com/reports/784186
CVE-ID: CVE-2020-8174
PR-URL: https://github.com/nodejs-private/node-private/pull/195
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com>
Reviewed-By: Michael Dawson <michael_da... |
kadm5_randkey_principal_3(void *server_handle,
krb5_principal principal,
krb5_boolean keepold,
int n_ks_tuple, krb5_key_salt_tuple *ks_tuple,
krb5_keyblock **keyblocks,
int *n_keys)
{
kr... | 0 | [
"CWE-703"
] | krb5 | c5be6209311d4a8f10fda37d0d3f876c1b33b77b | 171,806,716,674,174,330,000,000,000,000,000,000,000 | 127 | Null pointer deref in kadmind [CVE-2012-1013]
The fix for #6626 could cause kadmind to dereference a null pointer if
a create-principal request contains no password but does contain the
KRB5_KDB_DISALLOW_ALL_TIX flag (e.g. "addprinc -randkey -allow_tix
name"). Only clients authorized to create principals can trigger ... |
bool Item::get_date_from_year(MYSQL_TIME *ltime, ulonglong fuzzydate)
{
longlong value= val_int();
DBUG_ASSERT(unsigned_flag || value >= 0);
if (max_length == 2)
{
if (value < 70)
value+= 2000;
else if (value <= 1900)
value+= 1900;
}
value*= 10000; /* make it YYYYMMHH */
if (null_value... | 0 | [
"CWE-416"
] | server | c02ebf3510850ba78a106be9974c94c3b97d8585 | 301,115,554,279,696,170,000,000,000,000,000,000,000 | 19 | MDEV-24176 Preparations
1. moved fix_vcol_exprs() call to open_table()
mysql_alter_table() doesn't do lock_tables() so it cannot win from
fix_vcol_exprs() from there. Tests affected: main.default_session
2. Vanilla cleanups and comments. |
set_main_loader(PyObject *d, const char *filename, const char *loader_name)
{
PyObject *filename_obj, *bootstrap, *loader_type = NULL, *loader;
int result = 0;
filename_obj = PyUnicode_DecodeFSDefault(filename);
if (filename_obj == NULL)
return -1;
PyInterpreterState *interp = _PyInterprete... | 0 | [
"CWE-125"
] | cpython | dcfcd146f8e6fc5c2fc16a4c192a0c5f5ca8c53c | 257,180,618,442,910,800,000,000,000,000,000,000,000 | 30 | bpo-35766: Merge typed_ast back into CPython (GH-11645) |
static void add_notes_attrs(struct module *mod, const struct load_info *info)
{
unsigned int notes, loaded, i;
struct module_notes_attrs *notes_attrs;
struct bin_attribute *nattr;
/* failed to create section attributes, so can't create notes */
if (!mod->sect_attrs)
return;
/* Count notes sections and allocat... | 0 | [
"CWE-362",
"CWE-347"
] | linux | 0c18f29aae7ce3dadd26d8ee3505d07cc982df75 | 338,630,579,292,109,200,000,000,000,000,000,000,000 | 57 | module: limit enabling module.sig_enforce
Irrespective as to whether CONFIG_MODULE_SIG is configured, specifying
"module.sig_enforce=1" on the boot command line sets "sig_enforce".
Only allow "sig_enforce" to be set when CONFIG_MODULE_SIG is configured.
This patch makes the presence of /sys/module/module/parameters/s... |
static void ext4_inc_count(handle_t *handle, struct inode *inode)
{
inc_nlink(inode);
if (is_dx(inode) && inode->i_nlink > 1) {
/* limit is 16-bit i_links_count */
if (inode->i_nlink >= EXT4_LINK_MAX || inode->i_nlink == 2) {
set_nlink(inode, 1);
EXT4_SET_RO_COMPAT_FEATURE(inode->i_sb,
EXT4_FEATU... | 0 | [
"CWE-20"
] | linux | c9b92530a723ac5ef8e352885a1862b18f31b2f5 | 338,515,155,075,204,000,000,000,000,000,000,000,000 | 12 | ext4: make orphan functions be no-op in no-journal mode
Instead of checking whether the handle is valid, we check if journal
is enabled. This avoids taking the s_orphan_lock mutex in all cases
when there is no journal in use, including the error paths where
ext4_orphan_del() is called with a handle set to NULL.
Signe... |
void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
deflate_state *s;
charf *buf; /* input block */
ulg stored_len; /* length of input block */
int last; /* one if this is the last block for a file */
{
send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */
b... | 0 | [
"CWE-284",
"CWE-787"
] | zlib | 5c44459c3b28a9bd3283aaceab7c615f8020c531 | 70,282,742,999,929,380,000,000,000,000,000,000,000 | 20 | Fix a bug that can crash deflate on some input when using Z_FIXED.
This bug was reported by Danilo Ramos of Eideticom, Inc. It has
lain in wait 13 years before being found! The bug was introduced
in zlib 1.2.2.2, with the addition of the Z_FIXED option. That
option forces the use of fixed Huffman codes. For rare input... |
isofs_hashi_common(struct qstr *qstr, int ms)
{
const char *name;
int len;
char c;
unsigned long hash;
len = qstr->len;
name = qstr->name;
if (ms) {
while (len && name[len-1] == '.')
len--;
}
hash = init_name_hash();
while (len--) {
c = tolower(*name++);
hash = partial_name_hash(c, hash);
}
qstr-... | 0 | [
"CWE-20",
"CWE-399"
] | linux | 410dd3cf4c9b36f27ed4542ee18b1af5e68645a4 | 152,451,809,913,049,870,000,000,000,000,000,000,000 | 23 | isofs: Fix unbounded recursion when processing relocated directories
We did not check relocated directory in any way when processing Rock
Ridge 'CL' tag. Thus a corrupted isofs image can possibly have a CL
entry pointing to another CL entry leading to possibly unbounded
recursion in kernel code and thus stack overflow... |
png_check_fp_string(png_const_charp string, png_size_t size)
{
int state=0;
png_size_t char_index=0;
if (png_check_fp_number(string, size, &state, &char_index) != 0 &&
(char_index == size || string[char_index] == 0))
return state /* must be non-zero - see above */;
return 0; /* i.e. fai... | 0 | [
"CWE-476"
] | libpng | 812768d7a9c973452222d454634496b25ed415eb | 290,965,194,863,233,630,000,000,000,000,000,000,000 | 11 | [libpng16] Fixed a potential null pointer dereference in png_set_text_2()
(bug report and patch by Patrick Keshishian). |
ExprCreateMultiKeysymList(ExprDef *expr)
{
unsigned nLevels = darray_size(expr->keysym_list.symsMapIndex);
darray_resize(expr->keysym_list.symsMapIndex, 1);
darray_resize(expr->keysym_list.symsNumEntries, 1);
darray_item(expr->keysym_list.symsMapIndex, 0) = 0;
darray_item(expr->keysym_list.symsNumE... | 0 | [
"CWE-476"
] | libxkbcommon | e3cacae7b1bfda0d839c280494f23284a1187adf | 183,062,345,602,272,700,000,000,000,000,000,000,000 | 11 | xkbcomp: fix crashes in the parser when geometry tokens appear
In the XKB format, floats and various keywords can only be used in the
xkb_geometry section. xkbcommon removed support xkb_geometry, but still
parses it for backward compatibility. As part of ignoring it, the float
AST node and various keywords were remove... |
bool ring_buffer_empty(struct trace_buffer *buffer)
{
struct ring_buffer_per_cpu *cpu_buffer;
unsigned long flags;
bool dolock;
int cpu;
int ret;
/* yes this is racy, but if you don't like the race, lock the buffer */
for_each_buffer_cpu(buffer, cpu) {
cpu_buffer = buffer->buffers[cpu];
local_irq_save(flags... | 0 | [
"CWE-362"
] | linux | bbeb97464eefc65f506084fd9f18f21653e01137 | 295,988,494,306,678,300,000,000,000,000,000,000,000 | 23 | tracing: Fix race in trace_open and buffer resize call
Below race can come, if trace_open and resize of
cpu buffer is running parallely on different cpus
CPUX CPUY
ring_buffer_resize
atomic_read(&buffer->resize_disabled)
tracing_open
tracing_reset_online_cpus
ring_buffer_... |
void crypt_set_key_in_keyring(struct crypt_device *cd, unsigned key_in_keyring)
{
if (!cd)
return;
cd->key_in_keyring = key_in_keyring;
} | 0 | [
"CWE-345"
] | cryptsetup | 0113ac2d889c5322659ad0596d4cfc6da53e356c | 290,763,272,414,228,830,000,000,000,000,000,000,000 | 7 | 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... |
int SSL_select_next_proto(unsigned char **out, unsigned char *outlen,
const unsigned char *server,
unsigned int server_len,
const unsigned char *client,
unsigned int client_len)
{
unsigned int i, j;
const uns... | 0 | [
"CWE-310"
] | openssl | 56f1acf5ef8a432992497a04792ff4b3b2c6f286 | 165,056,931,227,527,930,000,000,000,000,000,000,000 | 38 | Disable SSLv2 default build, default negotiation and weak ciphers.
SSLv2 is by default disabled at build-time. Builds that are not
configured with "enable-ssl2" will not support SSLv2. Even if
"enable-ssl2" is used, users who want to negotiate SSLv2 via the
version-flexible SSLv23_method() will need to explicitly ca... |
static int encrypt_and_sign_nss_2_0 (
struct crypto_instance *instance,
const unsigned char *buf_in,
const size_t buf_in_len,
unsigned char *buf_out,
size_t *buf_out_len)
{
unsigned char *hash = buf_out;
unsigned char *data = hash + hash_len[instance->crypto_hash_type];
if (encrypt_nss(instance, buf_in, buf_in... | 0 | [
"CWE-703"
] | corosync | b3f456a8ceefac6e9f2e9acc2ea0c159d412b595 | 282,306,957,748,232,040,000,000,000,000,000,000,000 | 23 | totemcrypto: fix hmac key initialization
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com> |
bool Bool() const {
return chk(mongo::Bool).boolean();
} | 0 | [
"CWE-613"
] | mongo | e55d6e2292e5dbe2f97153251d8193d1cc89f5d7 | 109,100,555,291,851,420,000,000,000,000,000,000,000 | 3 | SERVER-38984 Validate unique User ID on UserCache hit |
static void intel_iommu_detach_device(struct iommu_domain *domain,
struct device *dev)
{
dmar_remove_one_dev_info(dev);
} | 0 | [] | linux | d8b8591054575f33237556c32762d54e30774d28 | 9,663,670,977,542,657,000,000,000,000,000,000,000 | 5 | iommu/vt-d: Disable ATS support on untrusted devices
Commit fb58fdcd295b9 ("iommu/vt-d: Do not enable ATS for untrusted
devices") disables ATS support on the devices which have been marked
as untrusted. Unfortunately this is not enough to fix the DMA attack
vulnerabiltiies because IOMMU driver allows translated reques... |
QPDFWriter::parseVersion(std::string const& version,
int& major, int& minor) const
{
major = atoi(version.c_str());
minor = 0;
size_t p = version.find('.');
if ((p != std::string::npos) && (version.length() > p))
{
minor = atoi(version.substr(p + 1).c_str());
}
std::string tmp = QUtil::... | 1 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 103,301,459,856,920,960,000,000,000,000,000,000,000 | 19 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
virtual ~OutputDev() {} | 0 | [] | poppler | abf167af8b15e5f3b510275ce619e6fdb42edd40 | 36,508,319,566,085,760,000,000,000,000,000,000,000 | 1 | Implement tiling/patterns in SplashOutputDev
Fixes bug 13518 |
TEST_P(WasmTest, DivByZero) {
Stats::IsolatedStoreImpl stats_store;
Api::ApiPtr api = Api::createApiForTest(stats_store);
Upstream::MockClusterManager cluster_manager;
Event::DispatcherPtr dispatcher(api->allocateDispatcher());
auto scope = Stats::ScopeSharedPtr(stats_store.createScope("wasm."));
NiceMock<L... | 0 | [
"CWE-476"
] | envoy | 8788a3cf255b647fd14e6b5e2585abaaedb28153 | 256,759,198,906,091,650,000,000,000,000,000,000,000 | 37 | 1.4 - Do not call into the VM unless the VM Context has been created. (#24)
* Ensure that the in VM Context is created before onDone is called.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Update as per offline discussion.
Signed-off-by: John Plevyak <jplevyak@gmail.com>
* Set in_vm_context_created_ in onNet... |
int main(int argc, char* argv[])
{
QUtil::setLineBuf(stdout);
if ((whoami = strrchr(argv[0], '/')) == NULL)
{
whoami = argv[0];
}
else
{
++whoami;
}
// For libtool's sake....
if (strncmp(whoami, "lt-", 3) == 0)
{
whoami += 3;
}
if (argc != 2)
{
usage();
}
... | 1 | [
"CWE-125"
] | qpdf | 1868a10f8b06631362618bfc85ca8646da4b4b71 | 219,379,033,012,348,900,000,000,000,000,000,000,000 | 35 | Replace all atoi calls with QUtil::string_to_int
The latter catches underflow/overflow. |
static int valid_weight(float f)
{
int w = (int)f;
return (w < NGHTTP2_MIN_WEIGHT? NGHTTP2_MIN_WEIGHT :
(w > NGHTTP2_MAX_WEIGHT)? NGHTTP2_MAX_WEIGHT : w);
} | 0 | [] | mod_h2 | 5e75e5685dd043fe93a5a08a15edd087a43f6968 | 145,506,804,897,757,050,000,000,000,000,000,000,000 | 6 | v1.11.0
--------------------------------------------------------------------------------
* connection IO event handling reworked. Instead of reacting on incoming bytes, the
state machine now acts on incoming frames that are affecting it. This reduces
state transitions.
* pytest suite now covers some basic tests... |
static int64_t guest_file_handle_add(HANDLE fh, Error **errp)
{
GuestFileHandle *gfh;
int64_t handle;
handle = ga_get_fd_handle(ga_state, errp);
if (handle < 0) {
return -1;
}
gfh = g_new0(GuestFileHandle, 1);
gfh->id = handle;
gfh->fh = fh;
QTAILQ_INSERT_TAIL(&guest_file_st... | 0 | [
"CWE-190"
] | qemu | 141b197408ab398c4f474ac1a728ab316e921f2b | 66,505,742,111,061,000,000,000,000,000,000,000,000 | 16 | 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... |
ecma_compare_get_string_chars (const ecma_string_t *string_p, /**< ecma-string */
lit_utf8_size_t *size_and_length_p) /**< [out] size and length */
{
switch (ECMA_STRING_GET_CONTAINER (string_p))
{
case ECMA_STRING_CONTAINER_HEAP_UTF8_STRING:
{
ecma_short_string_t *short... | 0 | [
"CWE-416"
] | jerryscript | 3bcd48f72d4af01d1304b754ef19fe1a02c96049 | 279,957,262,963,560,300,000,000,000,000,000,000,000 | 31 | 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 bool trap_bvr(struct kvm_vcpu *vcpu,
struct sys_reg_params *p,
const struct sys_reg_desc *rd)
{
u64 *dbg_reg = &vcpu->arch.vcpu_debug_state.dbg_bvr[rd->reg];
if (p->is_write)
reg_to_dbg(vcpu, p, dbg_reg);
else
dbg_to_reg(vcpu, p, dbg_reg);
trace_trap_reg(__func__, rd->reg, p->is_write, *d... | 0 | [
"CWE-20",
"CWE-617"
] | linux | 9e3f7a29694049edd728e2400ab57ad7553e5aa9 | 200,051,272,980,824,100,000,000,000,000,000,000,000 | 15 | arm64: KVM: pmu: Fix AArch32 cycle counter access
We're missing the handling code for the cycle counter accessed
from a 32bit guest, leading to unexpected results.
Cc: stable@vger.kernel.org # 4.6+
Signed-off-by: Wei Huang <wei@redhat.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> |
static int hclge_tm_pg_shapping_cfg(struct hclge_dev *hdev,
enum hclge_shap_bucket bucket, u8 pg_id,
u32 shapping_para)
{
struct hclge_pg_shapping_cmd *shap_cfg_cmd;
enum hclge_opcode_type opcode;
struct hclge_desc desc;
opcode = bucket ? HCLGE_OPC_TM_PG_P_SHAPPING :
HCLGE_OPC_TM_PG_C_SHAPPING;
... | 0 | [
"CWE-125"
] | linux | 04f25edb48c441fc278ecc154c270f16966cbb90 | 160,152,625,589,614,440,000,000,000,000,000,000,000 | 20 | net: hns3: add some error checking in hclge_tm module
When hdev->tx_sch_mode is HCLGE_FLAG_VNET_BASE_SCH_MODE, the
hclge_tm_schd_mode_vnet_base_cfg calls hclge_tm_pri_schd_mode_cfg
with vport->vport_id as pri_id, which is used as index for
hdev->tm_info.tc_info, it will cause out of bound access issue
if vport_id is e... |
GetLocatorPosition(XtermWidget xw)
{
ANSI reply;
TScreen *screen = TScreenOf(xw);
Window root, child;
int rx, ry, x, y;
unsigned int mask = 0;
int row = 0, col = 0;
Bool oor = False;
Bool ret = False;
int state;
/*
* DECterm turns the Locator off if the position is requeste... | 0 | [
"CWE-399"
] | xterm-snapshots | 82ba55b8f994ab30ff561a347b82ea340ba7075c | 183,239,130,335,599,170,000,000,000,000,000,000,000 | 64 | snapshot of project "xterm", label xterm-365d |
static int pgpGet(const uint8_t *s, size_t nbytes, const uint8_t *send,
unsigned int *valp)
{
int rc = -1;
*valp = 0;
if (nbytes <= 4 && send - s >= nbytes) {
unsigned int val = pgpGrab(s, nbytes);
if (send - s - nbytes >= val) {
rc = 0;
*valp = val;
}
}
return rc;
} | 0 | [
"CWE-347",
"CWE-284"
] | rpm | bd36c5dc9fb6d90c46fbfed8c2d67516fc571ec8 | 17,295,783,818,115,165,000,000,000,000,000,000,000 | 16 | Validate and require subkey binding signatures on PGP public keys
All subkeys must be followed by a binding signature by the primary key
as per the OpenPGP RFC, enforce the presence and validity in the parser.
The implementation is as kludgey as they come to work around our
simple-minded parser structure without touc... |
static int vfswrap_rmdir(vfs_handle_struct *handle, const char *path)
{
int result;
START_PROFILE(syscall_rmdir);
result = rmdir(path);
END_PROFILE(syscall_rmdir);
return result;
} | 0 | [
"CWE-665"
] | samba | 30e724cbff1ecd90e5a676831902d1e41ec1b347 | 196,318,812,883,833,200,000,000,000,000,000,000,000 | 9 | 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> |
static int do_send_XKeyEvent(rpc_message_t *message, XEvent *xevent)
{
int error;
if ((error = do_send_XAnyEvent(message, xevent)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xkey.root)) < 0)
return error;
if ((error = rpc_message_send_uint32(message, xevent->xkey.subwindow)) < 0)... | 0 | [
"CWE-264"
] | nspluginwrapper | 7e4ab8e1189846041f955e6c83f72bc1624e7a98 | 94,398,443,985,235,270,000,000,000,000,000,000,000 | 27 | Support all the new variables added |
static int qrtr_send_resume_tx(struct qrtr_cb *cb)
{
struct sockaddr_qrtr remote = { AF_QIPCRTR, cb->src_node, cb->src_port };
struct sockaddr_qrtr local = { AF_QIPCRTR, cb->dst_node, cb->dst_port };
struct qrtr_ctrl_pkt *pkt;
struct qrtr_node *node;
struct sk_buff *skb;
int ret;
node = qrtr_node_lookup(remote.... | 0 | [
"CWE-909"
] | linux | 50535249f624d0072cd885bcdce4e4b6fb770160 | 313,089,837,241,333,000,000,000,000,000,000,000,000 | 27 | net: qrtr: fix a kernel-infoleak in qrtr_recvmsg()
struct sockaddr_qrtr has a 2-byte hole, and qrtr_recvmsg() currently
does not clear it before copying kernel data to user space.
It might be too late to name the hole since sockaddr_qrtr structure is uapi.
BUG: KMSAN: kernel-infoleak in kmsan_copy_to_user+0x9c/0xb0 ... |
xmlReaderForFd(int fd, const char *URL, const char *encoding, int options)
{
xmlTextReaderPtr reader;
xmlParserInputBufferPtr input;
if (fd < 0)
return (NULL);
input = xmlParserInputBufferCreateFd(fd, XML_CHAR_ENCODING_NONE);
if (input == NULL)
return (NULL);
input->closecallba... | 0 | [
"CWE-399"
] | libxml2 | 213f1fe0d76d30eaed6e5853057defc43e6df2c9 | 280,872,430,670,640,020,000,000,000,000,000,000,000 | 21 | CVE-2015-1819 Enforce the reader to run in constant memory
One of the operation on the reader could resolve entities
leading to the classic expansion issue. Make sure the
buffer used for xmlreader operation is bounded.
Introduce a new allocation type for the buffers for this effect. |
read_2007_section_auxheader (Bit_Chain *restrict dat, Dwg_Data *restrict dwg,
r2007_section *restrict sections_map,
r2007_page *restrict pages_map)
{
Bit_Chain old_dat, sec_dat = { 0 };
//Bit_Chain *str_dat;
Dwg_AuxHeader *_obj = &dwg->auxheader;
Dwg_Obj... | 0 | [
"CWE-787"
] | libredwg | 45d2a290c65ed691be0901ba2b2ef51044e07a16 | 111,328,312,612,952,850,000,000,000,000,000,000,000 | 37 | decode_r2007: fix for invalid section size
See GH #350. With fuzzing section->data_size might not fit
section_page->uncomp_size. |
JSON::makeBool(bool value)
{
return JSON(new JSON_bool(value));
} | 0 | [
"CWE-787"
] | qpdf | d71f05ca07eb5c7cfa4d6d23e5c1f2a800f52e8e | 248,532,770,741,699,540,000,000,000,000,000,000,000 | 4 | Fix sign and conversion warnings (major)
This makes all integer type conversions that have potential data loss
explicit with calls that do range checks and raise an exception. After
this commit, qpdf builds with no warnings when -Wsign-conversion
-Wconversion is used with gcc or clang or when -W3 -Wd4800 is used
with ... |
void set_estimate_file_duration(bool estimate_duration) {
estimate_file_duration_ = estimate_duration;
} | 0 | [
"CWE-20"
] | libvpx | f00890eecdf8365ea125ac16769a83aa6b68792d | 143,701,905,038,856,210,000,000,000,000,000,000,000 | 3 | update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
https://chromium.googlesource.com/webm/libwebm/+log/af81f26..6ab9fcf
Change-Id: I9d56e1fbaba9b96404b4fbabefddc1a85b79c25d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.